@font-face {
    font-family: "bwgradualmedium";
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/Bw_Gradual_Medium/BwGradual-Medium.woff2) format("woff2"),
         url(../fonts/Bw_Gradual_Medium/BwGradual-Medium.woff) format("woff");
}

body {
    font-family: 'bwgradualmedium';
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    --uuf-red: #d64f45;
    --uuf-red-soft: rgba(214, 79, 69, 0.12);
    --uuf-red-border: rgba(214, 79, 69, 0.28);
    --app-bg: #121212;
    --app-surface: rgba(255, 255, 255, 0.055);
    --app-surface-strong: rgba(255, 255, 255, 0.09);
    --app-border: rgba(255, 255, 255, 0.1);
    --app-text: #f7f8f8;
    --app-muted: rgba(255, 255, 255, 0.56);
    --card-bg: #f7f8f8;
    --card-text: #1f2428;
    --card-muted: #66747c;
    --kanban-card-bg: #23272b;
    --kanban-card-bg-hover: #292e32;
    --kanban-card-border: rgba(255, 255, 255, 0.075);
    --kanban-card-text: #e9ecef;
    --kanban-card-muted: rgba(233, 236, 239, 0.62);
    --kanban-column-bg: #191d20;
    --kanban-column-head-bg: #191d20;
}

/* Theme Backgrounds */
body[data-bs-theme="light"] {
    --app-bg: #eceeed;
    --app-surface: rgba(255, 255, 255, 0.55);
    --app-surface-strong: #ffffff;
    --app-border: rgba(31, 36, 40, 0.09);
    --app-text: #1f2428;
    --app-muted: rgba(31, 36, 40, 0.58);
    --card-bg: #ffffff;
    --card-text: #1f2428;
    --card-muted: #6e7a81;
    --kanban-card-bg: rgba(255, 255, 255, 0.36);
    --kanban-card-bg-hover: rgba(255, 255, 255, 0.68);
    --kanban-card-border: rgba(31, 36, 40, 0.14);
    --kanban-card-text: #1f2428;
    --kanban-card-muted: rgba(31, 36, 40, 0.58);
    --kanban-column-bg: rgba(255, 255, 255, 0.2);
    --kanban-column-head-bg: rgba(236, 238, 237, 0.96);
    background-color: var(--app-bg);
    color: var(--app-text);
}

body[data-bs-theme="dark"] {
    background-color: var(--app-bg);
    color: #ddd;
}

.app-navbar {
    min-height: 58px;
    background: #1f2428 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.app-navbar .btn {
    border-radius: 8px;
}

.app-navbar .btn:hover,
.app-navbar .btn:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.app-navbar #timeDropdown {
    color: rgba(255, 255, 255, 0.72);
}

body[data-bs-theme="light"] .app-navbar {
    background: rgba(248, 249, 248, 0.94) !important;
    border-color: rgba(31, 36, 40, 0.11) !important;
    box-shadow: 0 1px 0 rgba(31, 36, 40, 0.04), 0 8px 18px rgba(31, 36, 40, 0.035) !important;
    backdrop-filter: blur(16px);
}

body[data-bs-theme="light"] .app-navbar .text-light,
body[data-bs-theme="light"] .app-navbar .btn,
body[data-bs-theme="light"] .app-navbar #timeDropdown,
body[data-bs-theme="light"] .app-navbar .dropdown-toggle {
    color: #1f2428 !important;
}

body[data-bs-theme="light"] .app-navbar .btn:hover,
body[data-bs-theme="light"] .app-navbar .btn:focus {
    background: rgba(31, 36, 40, 0.06);
}

body[data-bs-theme="light"] .app-navbar img[alt="Logo"] {
    width: 32px;
    height: 32px;
    padding: 5px;
    border-radius: 50%;
    background: #1f2428;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(31, 36, 40, 0.1);
}

body[data-bs-theme="light"] .app-navbar #timeDropdown,
body[data-bs-theme="light"] .app-navbar .dropdown-toggle {
    min-height: 36px;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

body[data-bs-theme="light"] .app-navbar #timeDropdown {
    background: rgba(31, 36, 40, 0.035);
}

body[data-bs-theme="light"] .app-navbar .dropdown-menu-dark {
    --bs-dropdown-color: #1f2428;
    --bs-dropdown-bg: #ffffff;
    --bs-dropdown-border-color: rgba(31, 36, 40, 0.1);
    --bs-dropdown-link-color: #1f2428;
    --bs-dropdown-link-hover-color: #1f2428;
    --bs-dropdown-link-hover-bg: rgba(31, 36, 40, 0.06);
    --bs-dropdown-link-active-bg: var(--uuf-red);
    box-shadow: 0 16px 34px rgba(31, 36, 40, 0.12);
}

/* Animations */
@keyframes fadeHighlightLight {
    0% { background-color: #ffffff; }
    50% { background-color: #f8f9fa; }
    100% { background-color: #ffffff; }
}

@keyframes fadeHighlightDark {
    0% { background-color: #333333; }
    50% { background-color: #444444; }
    100% { background-color: #333333; }
}

tr.active-time-entry, tr.active-time-entry td {
    animation: fadeHighlightLight 2.5s infinite alternate ease-in-out !important;
}

[data-bs-theme="dark"] tr.active-time-entry, 
[data-bs-theme="dark"] tr.active-time-entry td {
    animation: fadeHighlightDark 2.5s infinite alternate ease-in-out !important;
}

.kanban-task.recording {
    animation: fadeHighlightDark 2.5s infinite alternate ease-in-out !important;
}

.kanban-task-meta .badge {
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-board {
    width: calc(100% - 64px);
    hyphens: auto;
    padding: 14px 16px 14px 12px;
    background: var(--app-bg);
    min-height: calc(100vh - 58px);
}

.kanban-ghost {
    opacity: 0.5;
    background: #444;
    border: 2px dashed #999;
}

.kanban-dragging {
    opacity: 0.8;
    background-color: #333 !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease;
}

.kanban-column {
    background-color: var(--kanban-column-bg);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 10px;
    margin-top: 0;
    max-height: calc(100vh - 105px);
    overflow-y: auto;
    transition: background-color 0.3s ease;
    scrollbar-width: none;
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 18px), transparent 100%);
}

[data-bs-theme="light"] .kanban-column {
    background-color: var(--kanban-column-bg);
    border: 1px solid var(--app-border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.kanban-column::-webkit-scrollbar {
    display: none;
}

.kanban-column::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-column::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.24);
    border-radius: 999px;
}

.kanban-column h4 {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -10px -10px 10px;
    padding: 16px 12px 12px;
    color: var(--app-text);
    background: linear-gradient(to bottom, var(--kanban-column-head-bg) 72%, rgba(255, 255, 255, 0));
    font-size: clamp(1.05rem, 1rem + 0.25rem, 1.25rem);
    line-height: 1.15;
}

[data-bs-theme="dark"] .kanban-column h4 {
    background: linear-gradient(to bottom, var(--kanban-column-head-bg) 72%, rgba(25, 29, 32, 0));
}

.kanban-tasks {
    min-height: calc(100vh - 300px);
    display: grid;
    gap: 9px;
}

.kanban-task {
    position: relative;
    width: 100%;
    min-height: 84px;
    padding: 12px;
    border-radius: 8px;
    color: var(--kanban-card-text);
    background: var(--kanban-card-bg);
    border: 1px solid var(--kanban-card-border);
    box-shadow: none;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

[data-bs-theme="dark"] .kanban-task {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.kanban-task::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 8px 0 0 8px;
    background: transparent;
    transition: background-color 150ms ease;
}

.kanban-task:hover,
.kanban-task:focus {
    transform: translateY(-1px);
    border-color: var(--uuf-red-border);
    background: var(--kanban-card-bg-hover);
    box-shadow: 0 10px 24px rgba(31, 36, 40, 0.08);
    outline: 0;
}

.kanban-task:hover::before,
.kanban-task:focus::before {
    background: rgba(214, 79, 69, 0.7);
}

.kanban-task-main {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.kanban-task-main.no-avatars {
    grid-template-columns: 1fr;
}

.kanban-task-avatars {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 52px;
    padding-top: 1px;
}

.kanban-task-avatars > * + * {
    margin-left: -12px;
}

.kanban-avatar,
.kanban-task-avatars .fallbackavatar,
#editTaskCustomerInfo .kanban-avatar {
    width: 34px !important;
    height: 34px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    background: var(--kanban-card-bg);
    box-shadow: 0 3px 9px rgba(31, 36, 40, 0.14);
}

[data-bs-theme="dark"] .kanban-avatar,
[data-bs-theme="dark"] .kanban-task-avatars .fallbackavatar {
    background: #25292d;
}

.kanban-task-copy {
    min-width: 0;
}

.kanban-task-title {
    display: block;
    color: var(--kanban-card-text);
    font-size: 0.94rem;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.kanban-task-meta,
.kanban-task-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kanban-task-meta {
    margin-top: 9px;
}

.kanban-task-footer {
    margin-top: 9px;
    padding-left: 62px;
}

.kanban-task-main.no-avatars + .kanban-task-footer {
    padding-left: 0;
}

.task-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 24px;
    padding: 0.22rem 0.5rem;
    border-radius: 6px;
    color: #4c565d;
    background: #eef0f1;
    font-size: 0.78rem;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .task-chip {
    color: rgba(233, 236, 239, 0.76);
    background: rgba(255, 255, 255, 0.07);
}

.task-chip-project {
    gap: 0.34rem;
    min-height: 20px;
    padding: 0;
    color: rgba(31, 36, 40, 0.62);
    background: transparent;
    border-radius: 0;
    text-decoration: none;
}

[data-bs-theme="dark"] .task-chip-project {
    color: rgba(233, 236, 239, 0.58);
    background: transparent;
}

.task-chip-project:hover,
.task-chip-project:focus {
    color: var(--kanban-card-text);
    text-decoration: none;
}

.task-chip-project-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--project-accent, var(--uuf-red));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--project-accent, var(--uuf-red)) 16%, transparent);
    flex: 0 0 auto;
}

.task-chip-project-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-chip-muted {
    color: #5e6970;
    background: #eceeef;
}

.task-chip-warn {
    color: #76571a;
    background: #f4ead4;
}

.task-chip-danger {
    color: #a3312a;
    background: #f4dddb;
}

.task-chip-success {
    color: #116446;
    background: #dff0e8;
}

[data-bs-theme="dark"] .task-chip-success {
    color: #8ac9b0;
    background: rgba(68, 148, 111, 0.16);
}

.task-editor-modal .modal-dialog {
    --bs-modal-width: min(1060px, calc(100vw - 32px));
}

.task-editor-modal .modal-content {
    border-radius: 8px;
    overflow: hidden;
    color: var(--card-text);
    background: #eef0ef;
    border: 1px solid rgba(31, 36, 40, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.task-editor-modal .modal-header {
    min-height: 64px;
    padding: 1rem 1.25rem;
    background: #1f2428;
    border: 0;
}

.task-editor-modal .modal-title {
    color: #fff;
    font-size: 1.05rem;
}

.task-editor-modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.78;
}

.task-editor-modal .modal-body {
    padding: 0;
    background: #eef0ef;
}

#editTaskForm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-auto-flow: dense;
    gap: 0 18px;
    padding: 18px;
}

#editTaskCustomerInfo,
#editTaskForm > .mb-3:has(#editTaskTitle),
#editTaskForm > .mb-3:has(#editTaskDesc),
#editTaskForm > .mb-3:has(#taskAttachmentInput),
#checklist-wrapper,
#editTaskForm > hr {
    grid-column: 1;
}

#editTaskCustomerInfo {
    grid-row: 1;
    align-self: start;
}

#editTaskForm > .mb-3:has(#editTaskTitle) {
    grid-row: 2;
}

#editTaskForm > .mb-3:has(#editTaskDesc) {
    grid-row: 3;
}

#editTaskForm > .mb-3:has(#taskAttachmentInput) {
    grid-row: 4;
}

#checklist-wrapper {
    grid-row: 5;
}

#editTaskForm > .d-flex.justify-content-between {
    grid-column: 1 / -1;
    grid-row: 6;
}

#editTaskForm > .mb-3.position-relative:has(#editTaskCustomer),
#editTaskForm > .mb-3.position-relative:has(#editTaskProject),
#editTaskForm > .row,
#editTaskForm > .form-check,
#editTaskForm > .mb-3:has(#editTaskUser) {
    grid-column: 2;
}

#editTaskForm > .mb-3.position-relative:has(#editTaskCustomer) {
    grid-row: 1;
}

#editTaskForm > .mb-3.position-relative:has(#editTaskProject) {
    grid-row: 2;
}

#editTaskForm > .row {
    grid-row: 3;
}

#editTaskForm > .form-check {
    grid-row: 4;
}

#editTaskForm > .mb-3:has(#editTaskUser) {
    grid-row: 5;
}

#editTaskForm > .d-flex.justify-content-between {
    align-items: center;
    margin: 6px -18px -18px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.78);
    border-top: 1px solid rgba(31, 36, 40, 0.08);
}

#editTaskForm > .mb-3,
#editTaskForm > .row,
#editTaskForm > .form-check,
#checklist-wrapper,
#editTaskCustomerInfo {
    margin-bottom: 0 !important;
    padding: 0.95rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(31, 36, 40, 0.08);
}

#editTaskForm > .mb-3:has(#editTaskTitle),
#editTaskForm > .mb-3:has(#editTaskDesc),
#editTaskForm > .mb-3:has(#taskAttachmentInput),
#checklist-wrapper {
    padding: 16px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
}

#editTaskForm > .mb-3:has(#editTaskTitle) {
    padding-top: 0;
}

#editTaskCustomerInfo {
    margin-bottom: 14px !important;
    padding: 0 0 12px !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
}

#editTaskForm > .mb-3.position-relative:has(#editTaskCustomer),
#editTaskForm > .mb-3.position-relative:has(#editTaskProject),
#editTaskForm > .row,
#editTaskForm > .form-check,
#editTaskForm > .mb-3:has(#editTaskUser) {
    margin-bottom: 12px !important;
}

#editTaskForm > .row {
    margin-right: 0;
    margin-left: 0;
}

#editTaskForm > .row > * {
    padding-right: 0.35rem;
    padding-left: 0.35rem;
    margin-bottom: 0 !important;
}

#editTaskForm > .form-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 54px;
    padding-left: 0.9rem;
}

#editTaskForm > .form-check .form-check-input {
    float: none;
    margin: 0;
}

#editTaskForm > hr {
    display: none;
}

.task-editor-modal .form-label {
    margin-bottom: 0.45rem;
    color: #66747c;
    font-size: 0.76rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.task-editor-modal .form-control,
.task-editor-modal .form-select {
    min-height: 42px;
    border-radius: 8px;
    color: #1f2428;
    background-color: #f8f9f8;
    border-color: rgba(31, 36, 40, 0.08);
}

.task-editor-modal .form-control:focus,
.task-editor-modal .form-select:focus {
    border-color: var(--uuf-red);
    box-shadow: 0 0 0 0.2rem var(--uuf-red-soft);
}

.task-editor-modal textarea.form-control {
    min-height: 118px;
}

#editTaskTitle {
    min-height: 46px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1.18rem;
    line-height: 1.25;
}

#editTaskTitle:focus {
    box-shadow: none;
}

#editTaskDescPreview {
    min-height: 148px !important;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    color: #1f2428;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 36, 40, 0.07);
}

#editTaskCustomerInfo {
    margin: 0 0 0.25rem !important;
    min-height: 46px;
    color: #1f2428;
}

#checklist-wrapper,
#taskActivityWrapper {
    border-top: 1px solid rgba(31, 36, 40, 0.1) !important;
}

#checklist-wrapper {
    margin-top: 0 !important;
    border-top: 0 !important;
}

#taskActivityWrapper {
    margin-top: 1.25rem !important;
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
}

.checklist-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(31, 36, 40, 0.06);
}

.checklist-item:last-child {
    border-bottom: 0;
}

#taskActivityWrapper h5,
#checklist-wrapper h5 {
    color: #1f2428;
    font-size: 1rem;
}

[data-bs-theme="dark"] .task-editor-modal .modal-content {
    color: rgba(244, 245, 245, 0.9);
    background: #171b1e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

[data-bs-theme="dark"] .task-editor-modal .modal-header {
    background: #1d2226;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .task-editor-modal .modal-body {
    background: #171b1e;
}

[data-bs-theme="dark"] #editTaskForm > .mb-3,
[data-bs-theme="dark"] #editTaskForm > .row,
[data-bs-theme="dark"] #editTaskForm > .form-check,
[data-bs-theme="dark"] #checklist-wrapper,
[data-bs-theme="dark"] #editTaskCustomerInfo {
    background: #202528;
    border-color: rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] #editTaskForm > .mb-3:has(#editTaskTitle),
[data-bs-theme="dark"] #editTaskForm > .mb-3:has(#editTaskDesc),
[data-bs-theme="dark"] #editTaskForm > .mb-3:has(#taskAttachmentInput),
[data-bs-theme="dark"] #checklist-wrapper,
[data-bs-theme="dark"] #editTaskCustomerInfo {
    background: transparent !important;
}

[data-bs-theme="dark"] #editTaskForm > .d-flex.justify-content-between {
    background: rgba(22, 26, 29, 0.96);
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .task-editor-modal .form-label {
    color: rgba(233, 236, 239, 0.48);
}

[data-bs-theme="dark"] .task-editor-modal .form-control,
[data-bs-theme="dark"] .task-editor-modal .form-select {
    color: rgba(244, 245, 245, 0.9);
    background-color: #1b2023;
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .task-editor-modal .form-control::placeholder {
    color: rgba(244, 245, 245, 0.35);
}

[data-bs-theme="dark"] .task-editor-modal .input-group-text,
[data-bs-theme="dark"] .task-editor-modal .btn-outline-secondary {
    color: rgba(244, 245, 245, 0.62);
    background-color: #22272b;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .task-editor-modal .btn-outline-secondary:hover,
[data-bs-theme="dark"] .task-editor-modal .btn-outline-secondary:focus {
    color: rgba(244, 245, 245, 0.9);
    background-color: #2a3035;
    border-color: rgba(214, 79, 69, 0.55);
}

[data-bs-theme="dark"] #editTaskTitle,
[data-bs-theme="dark"] #editTaskCustomerInfo {
    color: rgba(244, 245, 245, 0.92);
}

[data-bs-theme="dark"] #editTaskDescPreview {
    color: rgba(244, 245, 245, 0.88);
    background: #202528;
    border-color: rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] #checklist-wrapper,
[data-bs-theme="dark"] #taskActivityWrapper {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] #taskActivityWrapper {
    background: #202528;
}

[data-bs-theme="dark"] .checklist-item {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] #taskActivityWrapper h5,
[data-bs-theme="dark"] #checklist-wrapper h5 {
    color: rgba(244, 245, 245, 0.9);
}

.task-editor-modal .btn-primary,
.task-editor-modal .btn-success,
.task-editor-modal .btn-outline-primary {
    border-radius: 8px;
}

.task-editor-modal .btn-primary,
.task-editor-modal .btn-success {
    color: #fff;
    background: #1f2428;
    border-color: #1f2428;
}

.task-editor-modal .btn-primary:hover,
.task-editor-modal .btn-success:hover,
.task-editor-modal .btn-primary:focus,
.task-editor-modal .btn-success:focus {
    background: #2a2020;
    border-color: var(--uuf-red);
}

.task-editor-modal .btn-outline-primary {
    color: #9f342c;
    border-color: var(--uuf-red-border);
}

.task-editor-modal .btn-outline-primary:hover,
.task-editor-modal .btn-outline-primary:focus {
    color: #fff;
    background: var(--uuf-red);
    border-color: var(--uuf-red);
}

@media (max-width: 920px) {
    #editTaskForm {
        grid-template-columns: 1fr;
    }

    #editTaskCustomerInfo,
    #editTaskForm > .mb-3:has(#editTaskTitle),
    #editTaskForm > .mb-3:has(#editTaskDesc),
    #editTaskForm > .mb-3:has(#taskAttachmentInput),
    #checklist-wrapper,
    #editTaskForm > hr,
    #editTaskForm > .d-flex.justify-content-between,
    #editTaskForm > .mb-3.position-relative:has(#editTaskCustomer),
    #editTaskForm > .mb-3.position-relative:has(#editTaskProject),
    #editTaskForm > .row,
    #editTaskForm > .form-check,
    #editTaskForm > .mb-3:has(#editTaskUser) {
        grid-column: 1;
    }
}

.mention {
    color: #0d6efd;
    font-weight: 600;
}

.mention-dropdown {
    max-height: 200px;
    overflow-y: auto;
}

.mention-item {
    padding: 8px 12px;
    cursor: pointer;
}

.mention-item:hover,
.mention-item.active {
    background-color: #f0f0f0;
}

[data-bs-theme="dark"] .mention-item:hover,
[data-bs-theme="dark"] .mention-item.active {
    background-color: #333;
}

.dark-mode .activity-entry {
    padding: 12px 0;
    border-bottom: 1px solid #333;
}

.dark-mode .avatar-sm {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2f7d68;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.bubble {
    background: #222;
    border-radius: 10px;
    padding: 10px 12px;
    max-width: 100%;
    color: #ddd;
    transition: background-color 0.3s ease;
}

.bubble-comment {
    background: #2c2c2c;
}

.bubble-log {
    background: #1e1e1e;
    font-style: italic;
    color: #aaa;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
}

.attachment-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.attachment-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-link small {
    color: #888;
    flex-shrink: 0;
}

.activity-attachment-input {
    max-width: 340px;
}

.activity-visibility-select {
    max-width: 130px;
}

.activity-visibility-badge {
    font-size: 0.72rem;
}

.project-index,
.project-workspace {
    min-height: calc(100vh - 58px);
    padding: 28px;
    color: var(--app-text);
    background: var(--app-bg);
}

.project-index {
    max-width: 1240px;
    margin: 0 auto;
}

.project-workspace {
    width: min(1680px, 100%);
    margin: 0 auto;
}

.project-index-head,
.project-hero,
.project-panel-head,
.project-actions {
    display: flex;
    align-items: center;
}

.project-index-head,
.project-hero,
.project-panel-head {
    justify-content: space-between;
    gap: 1rem;
}

.project-kicker {
    margin: 0 0 0.3rem;
    color: var(--app-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.project-index h1,
.project-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3.2rem);
    line-height: 1.05;
}

.project-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.project-btn,
.project-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0 0.75rem;
    border-radius: 8px;
    color: var(--app-text);
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    text-decoration: none;
}

.project-btn:hover,
.project-icon-btn:hover {
    color: var(--app-text);
    border-color: var(--uuf-red-border);
}

.project-btn-dark {
    color: #fff;
    background: #1f2428;
    border-color: #1f2428;
}

.project-btn-dark:hover {
    color: #fff;
    background: #2a2020;
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.project-metrics article,
.project-panel,
.project-row {
    border-radius: 8px;
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
}

.project-metrics article {
    padding: 1rem;
}

.project-metrics span,
.project-panel-head span,
.project-task-row small,
.project-file small,
.project-person small {
    color: var(--app-muted);
}

.project-metrics strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.4rem;
}

.project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 18px;
    align-items: start;
}

.project-main,
.project-sidebar {
    display: grid;
    gap: 18px;
}

.project-panel {
    padding: 18px;
}

.project-panel h2 {
    margin: 0 0 1rem;
    font-size: 1.12rem;
}

.project-panel-head {
    margin-bottom: 1rem;
}

.project-panel-head h2 {
    margin: 0;
}

.project-briefing label,
.project-mini-form label {
    display: block;
    margin: 0.85rem 0 0.35rem;
    color: var(--app-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.project-briefing input,
.project-briefing textarea,
.project-mini-form input,
.project-mini-form select {
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: var(--app-text);
    background: var(--app-bg);
    border: 1px solid var(--app-border);
}

.project-briefing textarea {
    resize: vertical;
}

body[data-bs-theme="light"] .project-briefing input,
body[data-bs-theme="light"] .project-briefing textarea,
body[data-bs-theme="light"] .project-mini-form input,
body[data-bs-theme="light"] .project-mini-form select {
    color: #1f2428;
    background: rgba(255, 255, 255, 0.52);
}

.project-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

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

.project-task-list,
.project-file-list,
.project-people,
.project-offer-list,
.project-offer-results {
    display: grid;
    gap: 8px;
}

.project-task-row,
.project-file,
.project-person,
.project-offer-card,
.project-offer-result,
.project-row {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
    color: var(--app-text);
    background: var(--kanban-card-bg);
    border: 1px solid var(--kanban-card-border);
    border-radius: 8px;
    text-decoration: none;
}

body[data-bs-theme="light"] .project-task-row,
body[data-bs-theme="light"] .project-file,
body[data-bs-theme="light"] .project-person,
body[data-bs-theme="light"] .project-offer-card,
body[data-bs-theme="light"] .project-offer-result,
body[data-bs-theme="light"] .project-row {
    color: #1f2428;
    background: rgba(255, 255, 255, 0.38);
    border-color: rgba(31, 36, 40, 0.12);
}

.project-task-row {
    grid-template-columns: 112px minmax(0, 1fr) 180px;
    align-items: center;
}

.project-status {
    display: inline-flex;
    width: max-content;
    padding: 0.22rem 0.48rem;
    border-radius: 6px;
    color: #f0b2ac;
    background: rgba(214, 79, 69, 0.14);
    font-size: 0.78rem;
}

body[data-bs-theme="light"] .project-status {
    color: #9f342c;
    background: #f5e4e2;
}

.project-mini-form {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.project-mini-form.inline {
    grid-template-columns: minmax(0, 1fr) 112px 42px;
}

.project-icon-btn {
    width: 42px;
    padding: 0;
}

.project-check {
    display: flex !important;
    align-items: center;
    gap: 0.45rem;
    margin: 0 !important;
    text-transform: none !important;
}

.project-check input {
    width: auto;
    min-height: auto;
}

.project-file {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
}

.project-person {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.project-offer-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.project-offer-card span,
.project-offer-result span,
.project-offer-card small,
.project-offer-result small {
    color: var(--app-muted);
    font-size: 0.78rem;
}

.project-offer-card form {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.project-offer-card a,
.project-offer-card button,
.project-person button {
    border: 0;
    color: var(--app-muted);
    background: transparent;
}

.project-offer-search {
    margin-top: 1rem;
}

.project-offer-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 0.5rem;
}

.project-offer-result {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.project-offer-result:hover {
    border-color: var(--uuf-red-border);
}

.project-offer-manual {
    margin-top: 0.35rem;
    color: var(--app-muted);
}

.project-offer-manual summary {
    cursor: pointer;
}

.project-offer-manual[open] {
    display: grid;
    gap: 0.55rem;
}

.project-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 8px;
}

.project-row-main,
.project-row-meta {
    display: flex;
    gap: 0.7rem;
}

.project-row-main {
    flex-direction: column;
    gap: 0.15rem;
}

.project-row-meta {
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--app-muted);
}

.project-notice,
.project-empty {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--app-text);
    background: var(--uuf-red-soft);
    border: 1px solid var(--uuf-red-border);
}

.project-notice-error {
    color: #fff;
    background: var(--uuf-red);
}

@media (max-width: 980px) {
    .project-layout,
    .project-metrics {
        grid-template-columns: 1fr;
    }

    .project-task-row,
    .project-row {
        grid-template-columns: 1fr;
    }
}

.mention-with-avatar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mention-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

#liveStatus.live .dot {
    background-color: #28a745;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

#liveStatus.offline .dot {
    background-color: #dc3545;
}

#liveStatus.loading .dot {
    background-color: #ffc107;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

#kanbanFilterPanel {
    background-color: rgb(33, 37, 41);
    border-right: 1px solid #2a2a2a;
    min-height: 100vh;
}

#kanbanFilterPanel button.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

#kanbanFilterPanel img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border 0.2s;
}

#kanbanFilterPanel button.active img {
    border-color: #fff;
}

#kanbanFilters {
    background-color: var(--app-surface);
    border-right: 1px solid var(--app-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 60px;
}

[data-bs-theme="light"] #kanbanFilters {
    background-color: #f0f1f0;
    border-right: 1px solid rgba(31, 36, 40, 0.1);
}

.filter-icon {
    width: 42px;
    height: 42px;
    padding: 0.2rem;
    border: none;
    background: transparent;
    position: relative;
    border-radius: 50%;
    opacity: 0.72;
    flex-shrink: 0;
    transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    color: var(--app-muted);
    background: transparent;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.filter-reset-btn:hover,
.filter-reset-btn:focus,
.filter-reset-btn.is-active {
    color: var(--app-text);
    background: var(--app-surface-strong);
    outline: 0;
    box-shadow: inset 0 -2px 0 var(--uuf-red);
}

.filter-reset-btn.is-active {
    box-shadow: inset 0 -2px 0 var(--uuf-red);
}

.filter-icon:hover {
    opacity: 1;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
}

.filter-icon .avatar-bg {
    background-color: rgba(250, 250, 250, 0.9);
    border-radius: 50%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.filter-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.filter-icon.active {
    outline: 2px solid var(--uuf-red);
    box-shadow: 0 0 0 4px var(--uuf-red-soft);
    opacity: 1;
}

.filter-icon.active::after {
    content: "\f26e";
    font-family: bootstrap-icons;
    position: absolute;
    bottom: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #fff;
    background: var(--uuf-red);
    font-size: 0.72rem;
}

#kanbanFilterSidebar {
    width: 72px;
    background-color: var(--app-surface);
    border-right: 1px solid var(--app-border);
    max-height: calc(100vh - 58px);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    padding: 16px 10px !important;
}

[data-bs-theme="light"] #kanbanFilterSidebar {
    background-color: #e8e9e8;
    border-right-color: rgba(31, 36, 40, 0.12);
}

#userFilters {
    width: 100%;
    border-bottom: 1px solid var(--app-border);
    border-top: 1px solid var(--app-border);
    padding: 14px 0;
    margin: 10px 0 4px;
    flex-shrink: 0;
    align-items: center;
}

#customerFilters {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    width: calc(100% + 24px);
    margin-right: -24px;
    padding: 4px 24px 12px 0;
    align-items: center;
    scrollbar-width: none;
    overscroll-behavior: contain;
    mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 22px), transparent 100%);
}

#customerFilters::-webkit-scrollbar {
    display: none;
}

#customerFilters::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.fallbackavatar {
    font-weight: 600;
    text-transform: uppercase;
    user-select: none;
}

#themeToggle {
    position: fixed;
    bottom: 50px;
    right: 50px;
    z-index: 999;
}


.calendar-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    position: relative;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    min-height: 120px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #444;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Lightmode Border */
[data-bs-theme="light"] .calendar-day {
    border: 1px solid #ccc;
}

/* Zahlen & Beschriftungen */
.day-number {
    font-size: 24px;
    font-weight: bold;
}

.day-week {
    font-size: 12px;
    color: gray;
}

[data-bs-theme="dark"] .day-week {
    color: #aaa;
}

.day-info {
    font-size: 14px;
}

/* Status-Styles */
.regular { background-color: #d1e7dd; }  /* Grünlich */
.holiday { background-color: #f8d7da; }  /* Rötlich */
.absent { background-color: #ffeeba; }   /* Gelblich */
.weekend {
    background-color: #000;
    color: #fff;
}

[data-bs-theme="light"] .weekend {
    background-color: #f0f0f0;
    color: #000;
}

.empty {
    background-color: transparent;
    border: none;
}

/* Überstunden-Label */
.overtime-label {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.overtime-positive { background-color: #28a745; }  /* Grün */
.overtime-negative { background-color: #dc3545; }  /* Rot */

.dimmed {
    opacity: 0.5;
}

/* Kundenportal */
.portal-board,
.portal-login {
    --portal-accent: #d64f45;
    --portal-accent-soft: #f5e4e2;
    --portal-accent-muted: rgba(214, 79, 69, 0.24);
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(33, 37, 41, 0.98) 0%, rgba(18, 18, 18, 1) 36%),
        #121212;
}

.portal-topbar {
    min-height: 58px;
}

.portal-logo-mark,
.portal-login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1f2428;
    border: 1px solid var(--portal-accent-muted);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.portal-logo-mark img {
    width: 24px;
    height: 24px;
}

.portal-brand-name,
.portal-brand-section {
    display: block;
}

.portal-brand-name {
    color: #fff;
    font-size: 0.95rem;
}

.portal-brand-section {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
}

.portal-customer-pill {
    align-items: center;
    min-height: 34px;
    max-width: 34vw;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-preview-pill {
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    color: #fff;
    background: var(--portal-accent-muted);
    border: 1px solid var(--portal-accent-muted);
}

.portal-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.portal-workspace {
    width: min(1760px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 34px 0 40px;
}

.portal-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 26px;
}

.portal-preview-notice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: -8px 0 20px;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(214, 79, 69, 0.12);
    border: 1px solid var(--portal-accent-muted);
}

.portal-tabs {
    display: inline-flex;
    gap: 0.35rem;
    margin: 0 0 18px;
    padding: 0.35rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.68);
    background: transparent;
}

.portal-tab:hover,
.portal-tab.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.portal-tab.is-active {
    box-shadow: inset 0 -2px 0 var(--portal-accent);
}

.portal-panel {
    display: none;
}

.portal-panel.is-active {
    display: block;
}

.portal-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 16px;
}

.portal-section-head h2,
.portal-doc-grid h3 {
    margin: 0;
    color: #fff;
}

.portal-section-head p {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.48);
}

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

.portal-doc-grid h3 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.portal-resource-list {
    display: grid;
    gap: 10px;
}

.portal-resource-item,
.portal-resource-empty {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-resource-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.9rem;
    color: #fff;
    text-decoration: none;
}

.portal-resource-item:hover {
    color: #fff;
    border-color: var(--portal-accent-muted);
}

.portal-resource-item strong,
.portal-resource-item small {
    display: block;
}

.portal-resource-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-resource-item small {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.52);
}

.portal-resource-icon,
.portal-resource-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(214, 79, 69, 0.18);
}

.portal-resource-avatar {
    text-transform: uppercase;
    font-size: 1.05rem;
}

.portal-resource-empty {
    padding: 1.6rem;
    color: rgba(255, 255, 255, 0.42);
    text-align: center;
}

.portal-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--portal-accent);
    font-size: 0.82rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.portal-page-head h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 5.2rem);
    line-height: 0.95;
}

.portal-page-copy {
    margin: 0.85rem 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 1.05rem;
}

.portal-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-height: 44px;
    padding-inline: 1rem;
}

.portal-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 14px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 8px;
}

.portal-kanban-column {
    min-width: 260px;
    min-height: calc(100vh - 235px);
    max-height: calc(100vh - 170px);
    padding: 14px;
    border-radius: 8px;
    background: rgba(230, 230, 230, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    overflow-y: auto;
}

.portal-kanban-column h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.98rem;
}

.portal-column-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.45rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    font-size: 0.82rem;
}

.portal-task-list {
    display: grid;
    gap: 10px;
}

.portal-task-card {
    width: 100%;
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.92);
    color: #1e2428;
    text-align: left;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.portal-task-card:hover,
.portal-task-card:focus {
    transform: translateY(-1px);
    border-color: var(--portal-accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
    outline: none;
}

.portal-task-card strong,
.portal-task-card span,
.portal-task-card small {
    display: block;
}

.portal-task-card strong {
    margin-top: 0.25rem;
    font-size: 1rem;
    line-height: 1.2;
}

.portal-task-project {
    width: fit-content;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--portal-accent-soft);
    color: #9f342c;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-task-status {
    margin-top: 0.7rem;
    color: #66747c;
    font-size: 0.82rem;
}

.portal-task-card small {
    margin-top: 0.5rem;
    color: #66747c;
}

.portal-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 94px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.92rem;
}

.portal-board .modal-content,
.portal-login-panel {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #f7f8f8;
    color: #1e2428;
}

.portal-board .modal-header,
.portal-board .modal-footer {
    border-color: rgba(30, 36, 40, 0.1);
}

.portal-board .btn-close {
    filter: none;
}

.portal-board .form-control,
.portal-login .form-control {
    border-radius: 8px;
}

.portal-btn {
    border-radius: 8px;
    font-weight: 600;
}

.portal-btn-dark {
    color: #fff;
    background: #1e2428;
    border-color: #1e2428;
}

.portal-btn-dark:hover,
.portal-btn-dark:focus {
    color: #fff;
    background: #2a2020;
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 0.2rem var(--portal-accent-muted);
}

.portal-btn-soft {
    color: #1e2428;
    background: #f7f8f8;
    border-color: rgba(255, 255, 255, 0.18);
}

.portal-btn-soft:hover,
.portal-btn-soft:focus {
    color: #fff;
    background: #1e2428;
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 0.2rem var(--portal-accent-muted);
}

.portal-board .btn-outline-light {
    color: rgba(255, 255, 255, 0.86);
    border-color: rgba(255, 255, 255, 0.32);
}

.portal-board .btn-outline-light:hover,
.portal-board .btn-outline-light:focus {
    color: #1e2428;
    background: #f7f8f8;
    border-color: #f7f8f8;
}

.portal-login .form-control {
    min-height: 44px;
    color: #1e2428;
    background: #fff;
    border-color: rgba(30, 36, 40, 0.18);
}

.portal-login .form-control:focus {
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 0.2rem var(--portal-accent-muted);
}

.portal-login .portal-btn-dark {
    min-height: 44px;
}

.portal-comment {
    padding: 12px 0;
    border-bottom: 1px solid rgba(30, 36, 40, 0.1);
}

.portal-readonly-note {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: #7b312c;
    background: var(--portal-accent-soft);
}

.portal-login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px);
    gap: 48px;
    align-items: center;
    width: min(1180px, calc(100vw - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 0;
}

.portal-login-brand {
    color: #fff;
}

.portal-login-logo {
    width: 54px;
    height: 54px;
    margin-bottom: 34px;
}

.portal-login-logo img {
    width: 36px;
    height: 36px;
}

.portal-login-brand p,
.portal-login-panel-head span {
    margin: 0 0 0.75rem;
    color: var(--portal-accent);
    text-transform: uppercase;
    font-size: 0.84rem;
    letter-spacing: 0;
}

.portal-login-brand h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 7vw, 7rem);
    line-height: 0.92;
}

.portal-login-panel {
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.portal-login-panel-head {
    margin-bottom: 24px;
}

.portal-login-panel-head h2 {
    margin: 0;
    font-size: 2rem;
}

@media (max-width: 1040px) {
    .portal-kanban-board {
        grid-template-columns: repeat(4, 280px);
    }
}

@media (max-width: 780px) {
    .portal-workspace,
    .portal-login-shell {
        width: min(100% - 28px, 640px);
    }

    .portal-page-head,
    .portal-login-shell {
        display: block;
    }

    .portal-primary-action {
        width: 100%;
        justify-content: center;
        margin-top: 18px;
    }

    .portal-login-brand {
        margin-bottom: 28px;
    }

    .portal-login-brand h1 {
        font-size: 3.4rem;
    }

    .portal-login-panel {
        padding: 22px;
    }
}

.customer-preview-body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(33, 37, 41, 0.98) 0%, rgba(18, 18, 18, 1) 34%),
        #121212;
    color: #ddd;
}

.customer-preview-page {
    max-width: 1200px;
}

.customer-preview-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.customer-preview-search .btn-light {
    color: #1e2428;
    background: #f7f8f8;
    border-color: #f7f8f8;
    border-radius: 8px;
    font-weight: 600;
}

.customer-preview-search .btn-light:hover,
.customer-preview-search .btn-light:focus {
    color: #fff;
    background: #2a2020;
    border-color: #d64f45;
}

.customer-preview-search input {
    min-width: 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
}

.customer-preview-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.customer-preview-list {
    display: grid;
    gap: 0.75rem;
}

.customer-preview-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.customer-preview-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.customer-preview-row:hover {
    border-color: rgba(214, 79, 69, 0.38);
}

.customer-preview-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
}

.customer-preview-logo img,
.customer-preview-logo span {
    width: 100%;
    height: 100%;
}

.customer-preview-logo img {
    object-fit: cover;
}

.customer-preview-logo span {
    align-items: center;
    justify-content: center;
    color: #1e2428;
    font-size: 1.3rem;
}

.customer-preview-main h2 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
}

.customer-preview-main p {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.48);
}

.customer-preview-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.customer-preview-meta span {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.customer-preview-open {
    color: #1e2428;
    background: #f7f8f8;
    border-color: #f7f8f8;
    border-radius: 8px;
    font-weight: 600;
}

.customer-preview-open:hover,
.customer-preview-open:focus {
    color: #fff;
    background: #2a2020;
    border-color: #d64f45;
}

.portal-manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.portal-manage-panel {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-manage-panel h2 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.15rem;
}

.portal-manage-form {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.portal-manage-form .form-control,
.portal-manage-form .form-select {
    border-radius: 8px;
}

.portal-board .form-check-input:checked,
.portal-login .form-check-input:checked,
.customer-preview-body .form-check-input:checked {
    background-color: #d64f45;
    border-color: #d64f45;
}

.portal-board .form-check-input:focus,
.portal-login .form-check-input:focus,
.customer-preview-body .form-check-input:focus {
    border-color: #d64f45;
    box-shadow: 0 0 0 0.2rem rgba(214, 79, 69, 0.24);
}

.portal-manage-list {
    display: grid;
    gap: 0.75rem;
}

.portal-manage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-manage-row h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.portal-manage-row p {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.52);
}

.customer-preview-empty {
    padding: 2rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.54);
    text-align: center;
    background: rgba(255, 255, 255, 0.055);
    border: 1px dashed rgba(255, 255, 255, 0.14);
}

@media (max-width: 860px) {
    .customer-preview-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .customer-preview-meta,
    .customer-preview-actions {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 980px) {
    .portal-doc-grid,
    .portal-manage-grid {
        grid-template-columns: 1fr;
    }
}
