:root {
    --fc-today-bg-color: #ffffff !important;
    --ca-font-size-step: 1px;
    --ca-compact-line-height: 1.22;
    --ca-compact-line-height-tight: 1.15;
}

body {
    font-size: calc(1rem + var(--ca-font-size-step));
}

.text-xs {
    font-size: calc(0.75rem + var(--ca-font-size-step)) !important;
}

.text-sm {
    font-size: calc(0.875rem + var(--ca-font-size-step)) !important;
}

.text-base {
    font-size: calc(1rem + var(--ca-font-size-step)) !important;
}

.text-lg {
    font-size: calc(1.125rem + var(--ca-font-size-step)) !important;
}

.text-xl {
    font-size: calc(1.25rem + var(--ca-font-size-step)) !important;
}

.text-2xl {
    font-size: calc(1.5rem + var(--ca-font-size-step)) !important;
}

body,
.fi-body,
.fi-main,
.fi-page,
.fi-modal-window,
.fi-section,
.fi-ta,
.fi-fo,
.fi-dropdown-panel {
    line-height: var(--ca-compact-line-height);
}

.fi-modal-content,
.fi-section-content,
.fi-ta-content,
.fi-fo-field-wrp,
.fi-fo-field-wrp-label,
.fi-input-wrp,
.fi-in,
.fi-select-input,
.fi-ta-text,
.fi-label,
.fi-btn-label,
.fi-dropdown-list-item-label,
.fi-tabs-item-label {
    line-height: var(--ca-compact-line-height-tight);
}

.fi-modal-content :where(p, li, dd),
.fi-section-content :where(p, li, dd),
.fi-ta-content :where(p, li, dd) {
    line-height: var(--ca-compact-line-height);
}

.fi-modal-content :where(.fi-fo-field-wrp-helper-text, .fi-fo-field-wrp-error-message),
.fi-section-content :where(.fi-fo-field-wrp-helper-text, .fi-fo-field-wrp-error-message) {
    line-height: 1.18;
}

.fi-one-time-code-input-ctn {
    --ca-otp-digit-size: 2.15rem;
    --ca-otp-digit-gap: 0.35rem;
    --ca-otp-caret-buffer: calc(var(--ca-otp-digit-size) + var(--ca-otp-digit-gap));
    display: inline-flex;
    gap: var(--ca-otp-digit-gap);
    width: max-content;
    max-width: 100%;
}

.fi-one-time-code-input-ctn > .fi-one-time-code-input-digit-field {
    display: block;
    flex: 0 0 var(--ca-otp-digit-size);
    width: var(--ca-otp-digit-size);
}

input[type='text'].fi-one-time-code-input {
    inset-inline: 0 !important;
    width: calc((var(--ca-otp-digit-size) * 6) + (var(--ca-otp-digit-gap) * 5) + var(--ca-otp-caret-buffer)) !important;
    max-width: none;
    padding-inline: calc((var(--ca-otp-digit-size) - 1ch) / 2) 0 !important;
    font-family: var(--font-mono) !important;
    font-size: 1rem !important;
    font-variant-numeric: tabular-nums;
    line-height: 1 !important;
    letter-spacing: calc(var(--ca-otp-digit-size) + var(--ca-otp-digit-gap) - 1ch) !important;
}

[data-ca-bug-report-modal] {
    max-height: calc(100dvh - 2rem);
}

[data-ca-bug-report-modal][data-ca-modal-dragged="1"] {
    margin: 0 !important;
    overflow-y: auto;
}

[data-ca-bug-report-modal] > .fi-modal-header {
    cursor: grab;
    user-select: none;
}

[data-ca-bug-report-modal][data-ca-modal-dragging="1"] > .fi-modal-header {
    cursor: grabbing;
}

[data-ca-quantity-import-file-modal] {
    overflow: hidden;
}

[data-ca-quantity-import-file-modal] > .fi-modal-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ca-email-template-section {
    border-left: 4px solid #dc2626 !important;
}

.ca-email-template-section .fi-section-header-heading {
    color: #b91c1c !important;
    font-weight: 900 !important;
}

.ca-email-template-section .fi-section-header {
    background: #fef2f2 !important;
}

.ca-email-rich-editor.fi-fo-rich-editor {
    overflow: hidden;
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ca-email-rich-editor .fi-fo-rich-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #dbe3ee;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 8px;
}

.ca-email-rich-editor .fi-fo-rich-editor-toolbar-group {
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.ca-email-rich-editor .fi-fo-rich-editor-main {
    min-height: var(--ca-email-editor-min-height, 320px);
    background: #ffffff;
}

.ca-email-rich-editor .fi-fo-rich-editor-content {
    min-height: var(--ca-email-editor-min-height, 320px);
    max-height: min(72vh, 760px);
    overflow: auto;
    padding: 18px 20px;
    background:
        linear-gradient(90deg, rgba(203, 213, 225, 0.16) 1px, transparent 1px),
        linear-gradient(180deg, rgba(203, 213, 225, 0.16) 1px, transparent 1px),
        #ffffff;
    background-size: 24px 24px;
    font-size: 15px;
    line-height: 1.6;
}

.ca-email-rich-editor .fi-fo-rich-editor-content .ProseMirror {
    min-height: calc(var(--ca-email-editor-min-height, 320px) - 36px);
    outline: none;
}

.ca-email-rich-editor .fi-fo-rich-editor-content :where(h1, h2, h3) {
    letter-spacing: 0;
}

.ca-email-rich-editor .fi-fo-rich-editor-content img {
    border-radius: 6px;
}

.ca-email-rich-editor .fi-fo-rich-editor-content table {
    background: rgba(255, 255, 255, 0.82);
}

.ca-supplier-brand-report {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    color: #111827;
}

.ca-supplier-brand-report__summary,
.ca-supplier-brand-report__empty {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
    color: #374151;
    font-size: 0.94rem;
    line-height: 1.45;
    padding: 0.75rem 0.9rem;
}

.ca-supplier-brand-report__empty {
    background: #ffffff;
    color: #6b7280;
    padding-block: 1.5rem;
    text-align: center;
}

.ca-supplier-brand-report__table-wrap {
    max-height: min(64vh, 720px);
    overflow: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
}

.ca-supplier-brand-report__table {
    width: 100%;
    min-width: 1560px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    table-layout: fixed;
}

.ca-supplier-brand-report__table th,
.ca-supplier-brand-report__table td {
    padding: 0.62rem 0.85rem;
    white-space: nowrap;
    vertical-align: middle;
}

.ca-supplier-brand-report__table th {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid #cbd5e1;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-align: left;
}

.ca-supplier-brand-report__table td {
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.ca-supplier-brand-report__table :is(th, td) + :is(th, td) {
    border-left: 1px solid #eef2f7;
}

.ca-supplier-brand-report__table tbody tr:nth-child(even) td {
    background: #f9fafb;
}

.ca-supplier-brand-report__table tbody tr:hover td {
    background: #eef6ff;
}

.ca-supplier-brand-report__table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 1;
    border-top: 1px solid #cbd5e1;
    border-bottom: 0;
    background: #eef2ff;
    color: #111827;
    font-weight: 800;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(1) {
    width: 235px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(2) {
    width: 130px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(3) {
    width: 115px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(4) {
    width: 125px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(5) {
    width: 140px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(6) {
    width: 150px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(7) {
    width: 125px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(8) {
    width: 125px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(9) {
    width: 180px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(10) {
    width: 125px;
}

.ca-supplier-brand-report__table :is(th, td):nth-child(11) {
    width: 110px;
}

.ca-supplier-brand-report__supplier {
    color: #111827 !important;
    font-weight: 800;
}

.ca-supplier-brand-report__supplier,
.ca-supplier-brand-report__brand {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ca-supplier-brand-report__number {
    font-variant-numeric: tabular-nums;
    text-align: right !important;
}

.ca-supplier-brand-report__margin {
    font-weight: 800;
}

.ca-supplier-brand-report__margin.is-positive {
    color: #15803d;
}

.ca-supplier-brand-report__margin.is-negative {
    color: #dc2626;
}

html.dark .ca-supplier-brand-report {
    color: #f9fafb;
}

html.dark .ca-supplier-brand-report__summary,
html.dark .ca-supplier-brand-report__empty {
    border-color: #374151;
    background: #111827;
    color: #d1d5db;
}

html.dark .ca-supplier-brand-report__table-wrap {
    border-color: #374151;
    background: #020617;
}

html.dark .ca-supplier-brand-report__table th {
    border-bottom-color: #475569;
    background: #111827;
    color: #e5e7eb;
}

html.dark .ca-supplier-brand-report__table td {
    border-bottom-color: #1f2937;
    color: #d1d5db;
}

html.dark .ca-supplier-brand-report__table :is(th, td) + :is(th, td) {
    border-left-color: #1f2937;
}

html.dark .ca-supplier-brand-report__table tbody tr:nth-child(even) td {
    background: #0f172a;
}

html.dark .ca-supplier-brand-report__table tbody tr:hover td {
    background: #1e293b;
}

html.dark .ca-supplier-brand-report__table tfoot td {
    border-top-color: #475569;
    background: #172554;
    color: #f9fafb;
}

html.dark .ca-supplier-brand-report__supplier {
    color: #f9fafb !important;
}

html.dark .ca-supplier-brand-report__margin.is-positive {
    color: #86efac;
}

html.dark .ca-supplier-brand-report__margin.is-negative {
    color: #fca5a5;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.fi-logo {
    display: none !important;
}
.fi-topbar-nav-groups {
    column-gap: calc(var(--spacing) * 1) !important;
    margin-inline: 0 !important;
}
.fi-topbar-nav-groups .fi-topbar-item-btn {
    column-gap: calc(var(--spacing) * 1.5);
    padding-inline: calc(var(--spacing) * 2);
}

.ca-topbar-actions,
.fi-topbar .fi-topbar-database-notifications-btn {
    --ca-topbar-badge-ring: #ffffff;
}

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

.ca-topbar-icon-link,
.fi-topbar .ca-topbar-icon-button.fi-icon-btn,
.fi-topbar .fi-topbar-database-notifications-btn.fi-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
}

.ca-topbar-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
}

.ca-topbar-icon,
.fi-topbar .ca-topbar-icon-button.fi-icon-btn > .fi-icon:not(.fi-loading-indicator),
.fi-topbar .fi-topbar-database-notifications-btn.fi-icon-btn > .fi-icon:not(.fi-loading-indicator) {
    display: block;
    width: 24px;
    height: 24px;
}

.ca-topbar-icon-link:hover,
.fi-topbar .ca-topbar-icon-button.fi-icon-btn:hover,
.fi-topbar .fi-topbar-database-notifications-btn.fi-icon-btn:hover {
    background: #f3f4f6;
}

.ca-topbar-count-badge,
.fi-topbar .fi-topbar-database-notifications-btn .fi-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--ca-topbar-badge-ring), 0 0 0 3px rgba(239, 68, 68, 0.22), 0 0 8px rgba(239, 68, 68, 0.5);
    transform-origin: center;
    animation: ca-topbar-count-pulse 0.95s ease-in-out infinite;
    will-change: transform, box-shadow, background-color;
}

.ca-topbar-mail-button:has(.ca-topbar-count-badge) .ca-topbar-icon,
.fi-topbar .fi-topbar-database-notifications-btn:has(.fi-icon-btn-badge-ctn) > .fi-icon:not(.fi-loading-indicator) {
    color: #dc2626;
    stroke: #dc2626;
}

.fi-topbar .fi-topbar-database-notifications-btn .fi-icon-btn-badge-ctn {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    bottom: auto !important;
    left: auto !important;
    inset: auto -2px auto auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: -2px !important;
    z-index: 1 !important;
    display: flex !important;
    width: auto !important;
    max-width: 24px !important;
    background: transparent !important;
    pointer-events: none;
    transform: none !important;
    translate: none !important;
    --tw-translate-x: 0 !important;
    --tw-translate-y: 0 !important;
}

.fi-topbar .fi-topbar-database-notifications-btn .fi-icon-btn-badge-ctn .fi-badge {
    position: static !important;
    transform: none !important;
    translate: none !important;
    --tw-translate-x: 0 !important;
    --tw-translate-y: 0 !important;
}

html.dark .ca-topbar-icon-link:hover,
html.dark .fi-topbar .ca-topbar-icon-button.fi-icon-btn:hover,
html.dark .fi-topbar .fi-topbar-database-notifications-btn.fi-icon-btn:hover {
    background: #1f2937;
}

html.dark .ca-topbar-actions,
html.dark .fi-topbar .fi-topbar-database-notifications-btn {
    --ca-topbar-badge-ring: #111827;
}

html.dark .ca-topbar-count-badge,
html.dark .fi-topbar .fi-topbar-database-notifications-btn .fi-badge {
    box-shadow: 0 0 0 2px #111827, 0 0 0 3px rgba(248, 113, 113, 0.26), 0 0 10px rgba(248, 113, 113, 0.55);
}

@keyframes ca-topbar-count-pulse {
    0%,
    100% {
        transform: scale(1);
        background: #ef4444;
        box-shadow: 0 0 0 2px var(--ca-topbar-badge-ring), 0 0 0 3px rgba(239, 68, 68, 0.2), 0 0 7px rgba(239, 68, 68, 0.45);
    }

    50% {
        transform: scale(1.2);
        background: #dc2626;
        box-shadow: 0 0 0 2px var(--ca-topbar-badge-ring), 0 0 0 7px rgba(239, 68, 68, 0), 0 0 14px rgba(220, 38, 38, 0.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ca-topbar-count-badge,
    .fi-topbar .fi-topbar-database-notifications-btn .fi-badge {
        animation: none;
    }
}

@media (max-width: 640px) {
    .ca-topbar-actions {
        gap: 0;
    }

    .ca-topbar-icon-link,
    .fi-topbar .ca-topbar-icon-button.fi-icon-btn,
    .fi-topbar .fi-topbar-database-notifications-btn.fi-icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 8px;
    }

    .ca-topbar-icon,
    .fi-topbar .ca-topbar-icon-button.fi-icon-btn > .fi-icon:not(.fi-loading-indicator),
    .fi-topbar .fi-topbar-database-notifications-btn.fi-icon-btn > .fi-icon:not(.fi-loading-indicator) {
        width: 22px;
        height: 22px;
    }

    .ca-topbar-count-badge,
    .fi-topbar .fi-topbar-database-notifications-btn .fi-badge {
        top: 0 !important;
        right: 0 !important;
        min-width: 14px;
        height: 14px;
        padding: 0 3px;
        font-size: 9px;
        line-height: 14px;
        box-shadow: 0 0 0 2px var(--ca-topbar-badge-ring), 0 0 7px rgba(239, 68, 68, 0.5);
        animation: ca-topbar-count-mobile-pulse 1s ease-in-out infinite;
    }

    .fi-topbar .fi-topbar-database-notifications-btn .fi-icon-btn-badge-ctn {
        top: 0 !important;
        right: 0 !important;
        inset: auto 0 auto auto !important;
        inset-inline-end: 0 !important;
        max-width: 22px !important;
    }
}

@keyframes ca-topbar-count-mobile-pulse {
    0%,
    100% {
        transform: scale(1);
        background: #ef4444;
        box-shadow: 0 0 0 2px var(--ca-topbar-badge-ring), 0 0 6px rgba(239, 68, 68, 0.45);
    }

    50% {
        transform: scale(1.14);
        background: #dc2626;
        box-shadow: 0 0 0 2px var(--ca-topbar-badge-ring), 0 0 10px rgba(220, 38, 38, 0.75);
    }
}

.fi-header {
    min-width: 0;
}
.fi-header-actions-ctn {
    flex-shrink: 1 !important;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
    min-width: 0;
}
.fi-header-actions-ctn > .fi-ac:not(.fi-width-full) {
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}

.ca-finance-invoice-table .fi-ta-row:nth-child(even) > .fi-ta-cell {
    background: #f8fafc !important;
}

.ca-finance-invoice-table .fi-ta-row:nth-child(even):hover > .fi-ta-cell {
    background: #eef6ff !important;
}

html.dark .ca-finance-invoice-table .fi-ta-row:nth-child(even) > .fi-ta-cell {
    background: #0f172a !important;
}

html.dark .ca-finance-invoice-table .fi-ta-row:nth-child(even):hover > .fi-ta-cell {
    background: #1e293b !important;
}

@media (min-width: 1024px) and (hover: hover) {
    .fi-ta-table .fi-ta-actions-header-cell,
    .fi-ta-table .fi-ta-row > .fi-ta-cell:has(> .fi-ta-actions) {
        position: sticky;
        inset-inline-end: 0;
        z-index: 12;
        background: #ffffff;
        box-shadow: -10px 0 14px -14px rgba(15, 23, 42, 0.45);
    }

    .fi-ta-table thead .fi-ta-actions-header-cell {
        z-index: 13;
    }

    .fi-ta-table .fi-ta-row > .fi-ta-cell:has(> .fi-ta-actions .fi-dropdown-panel[style*="display: block"]) {
        z-index: 30;
    }

    .fi-ta-table .fi-ta-actions-header-cell:first-child,
    .fi-ta-table .fi-ta-row > .fi-ta-cell:first-child:has(> .fi-ta-actions) {
        inset-inline-start: 0;
        inset-inline-end: auto;
        box-shadow: 10px 0 14px -14px rgba(15, 23, 42, 0.45);
    }

    html.dark .fi-ta-table .fi-ta-actions-header-cell,
    html.dark .fi-ta-table .fi-ta-row > .fi-ta-cell:has(> .fi-ta-actions) {
        background: var(--ca-dark-panel, #111827);
        box-shadow: -10px 0 14px -14px rgba(0, 0, 0, 0.75);
    }

    html.dark .fi-ta-table .fi-ta-actions-header-cell:first-child,
    html.dark .fi-ta-table .fi-ta-row > .fi-ta-cell:first-child:has(> .fi-ta-actions) {
        box-shadow: 10px 0 14px -14px rgba(0, 0, 0, 0.75);
    }
}
#calendar {
    width: 100%;
}
.fc-license-message {
    display: none !important;
}

.wo-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    line-height: 1.18;
}

.fi-modal:not(.fi-modal-has-sticky-header)>.fi-modal-window-ctn>.fi-modal-window:not(.fi-modal-window-has-icon) .fi-modal-content, .fi-modal:not(.fi-modal-has-sticky-header)>.fi-modal-window-ctn>.fi-modal-window:not(.fi-modal-window-has-icon) .fi-modal-footer {
    padding-inline: calc(var(--spacing) * 3);
    padding-block: calc(var(--spacing) * 3);
}

.wo-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 0.75rem 0.25rem;
    border-radius: 0.75rem;
    padding-top: 0.25rem;
    background: linear-gradient(to right, #f3f4f6, #e5e7eb);
    border: 1px solid #d1d5db;
}

.wo-top-row .wo-field {
    flex: 1 1 0;
    min-width: 160px;
}

.wo-top-row .wo-number-field {
    flex: 0 1 140px;
}

.wo-label {
    display: block;
    font-size: 0.7625rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4b5563;
}

.wo-input,
.wo-textarea {
    width: 100%;
    border-radius: 0.45rem;
    border: 1px solid #d1d5db;
    padding: 0.3rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    background-color: #ffffff;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.wo-input:focus,
.wo-textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #4f46e5;
    box-shadow:
        0 0 0 1px #4f46e5,
        0 1px 3px 0 rgba(15, 23, 42, 0.15);
    background-color: #ffffff;
}

.wo-textarea {
    resize: vertical;
    min-height: 64px;
}

.wo-tax-lookup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 0.35rem;
    align-items: center;
}

.wo-tax-refresh-button {
    width: 34px;
    height: 32px;
    border: 1px solid #2563eb;
    border-radius: 0.45rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wo-tax-refresh-button:hover:not(:disabled),
.wo-tax-refresh-button:focus-visible:not(:disabled) {
    background: #dbeafe;
    border-color: #1d4ed8;
}

.wo-tax-refresh-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wo-tax-lookup-status {
    min-height: 1rem;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.wo-tax-lookup-success {
    color: #15803d;
}

.wo-tax-lookup-error {
    color: #b91c1c;
}

.wo-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 1rem;
}

.wo-columns.wo-counter-sale-columns {
    grid-template-columns: 1fr 1fr;
}

.wo-col-25,
.wo-col-50 {
    min-width: 0;
}

@media (max-width: 1024px) {
    .wo-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .wo-col-25,
    .wo-col-50 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.wo-card {
    height: 100%;
    line-height: 1.18;
    border-radius: 0.9rem;
    border: 1px solid #e5e7eb;
    padding: 0.65rem 0.65rem 0.6rem;
    background: radial-gradient(circle at top left, #f9fafb 0, #f3f4f6 45%, #e5e7eb 100%);
    box-shadow: 0 12px 20px -15px rgba(15, 23, 42, 0.25), 0 4px 6px -4px rgba(15, 23, 42, 0.12);
}

.wo-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.wo-card-title {
    font-size: 0.8625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
}

.wo-card-body > .wo-field-group + .wo-field-group {
    margin-top: 0.42rem;
}

.wo-work-days-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
    margin-bottom: 1rem;
}

.wo-work-day-tabs {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.wo-work-day-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.wo-add-work-day-button {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 0.55rem;
    background: #f3f4f6;
    color: #111827;
    font-size: 0.8625rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .wo-work-days-toolbar {
        grid-template-columns: 1fr;
    }

    .wo-add-work-day-button {
        justify-self: start;
    }
}

.wo-field-group-inline {
    display: flex;
    gap: 0.5rem;
    margin-top: 4px;
}

.wo-field-group-inline .wo-field {
    flex: 1 1 0;
}

.wo-address-row {
    display: grid;
    gap: 0.5rem;
    margin-top: 4px;
}

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

.wo-address-row-3 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.wo-address-row-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 540px) {
    .wo-address-row {
        grid-template-columns: 1fr;
    }
}

.mb-6 {
    margin-bottom: 6px !important;
}
.mb-8 {
    margin-bottom: 8px !important;
}
.mb-10 {
    margin-bottom: 10px !important;
}
.mb-12 {
    margin-bottom: 12px !important;
}

.wo-owner-wrapper {
    position: relative;
}

.wo-row-info-trigger {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1px solid #93c5fd;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    cursor: help;
}

.wo-row-info-trigger[hidden] {
    display: none !important;
}

.wo-row-info-trigger:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.wo-row-info-tooltip {
    position: absolute;
    left: 0;
    top: 24px;
    z-index: 1000;
    display: none;
    width: max-content;
    max-width: 280px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #111827;
    color: #f9fafb;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    pointer-events: none;
    white-space: nowrap;
}

.wo-row-info-trigger:hover .wo-row-info-tooltip,
.wo-row-info-trigger:focus .wo-row-info-tooltip,
.wo-row-info-trigger:focus-within .wo-row-info-tooltip {
    display: block;
}

.wo-owner-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    max-height: 14rem;
    overflow-y: auto;
    box-shadow: 0 14px 24px -12px rgba(15, 23, 42, 0.35), 0 6px 8px -6px rgba(15, 23, 42, 0.2);
    z-index: 40;
    font-size: 0.875rem;
    line-height: 1.18;
}

.wo-owner-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
}

.wo-owner-suggestion-item:hover {
    background: #f3f4f6;
}

.wo-owner-suggestion-name {
    font-weight: 600;
    display: block;
}

.wo-owner-suggestion-meta {
    color: #6b7280;
    font-size: 0.7625rem;
}

.wo-pill {
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.7625rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    background: rgba(15, 23, 42, 0.03);
}

.fi-modal-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid rgb(229 231 235);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.fi-modal-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.9125rem;
    font-weight: 600;
    line-height: 1.1;
    border-radius: 0.5rem;
    background: rgb(243 244 246);
    color: rgb(55 65 81);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fi-modal-tab:hover {
    background: rgb(229 231 235);
}

.fi-modal-tab.is-active {
    background: rgb(59 130 246);
    color: #fff;
}

.fi-modal-tab.is-active:hover {
    background: rgb(37 99 235);
}

/* TAB CONTENT WRAPPER */
.fi-modal-tab-content {
    background: transparent;
}

.ca-repairs-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.ca-repairs-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1360px;
    font-size: 13px !important;
}

.ca-repairs-table th,
.ca-repairs-table td {
    padding: 4px !important;
    vertical-align: top;
}

.ca-repairs-table th {
    font-size: 12px;
    line-height: 1.1;
    white-space: normal;
}

.ca-repairs-table input:not([type="checkbox"]),
.ca-repairs-table select {
    min-width: 0 !important;
    max-width: 100% !important;
    height: 29px;
    padding: 4px 5px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
}

.ca-repairs-table :is(th, td):nth-child(1) {
    width: 320px;
}

.ca-repairs-table :is(th, td):nth-child(2) {
    width: 110px;
}

.ca-repairs-table :is(th, td):nth-child(3) {
    width: 86px;
}

.ca-repairs-table :is(th, td):nth-child(4) {
    width: 92px;
}

.ca-repairs-table td:nth-child(4) > div {
    gap: 4px !important;
}

.ca-repairs-table :is(th, td):nth-child(5),
.ca-repairs-table :is(th, td):nth-child(8) {
    width: 84px;
}

.ca-repairs-table :is(th, td):nth-child(6),
.ca-repairs-table :is(th, td):nth-child(7) {
    width: 112px;
}

.ca-repairs-table :is(th, td):nth-child(9),
.ca-repairs-table :is(th, td):nth-child(10) {
    width: 116px;
}

.ca-repairs-table :is(th, td):nth-child(11) {
    width: 150px;
}

.ca-repairs-table :is(th, td):nth-child(12) {
    width: 136px;
}

.ca-repairs-table :is(th, td):nth-child(13) {
    width: 46px;
}

.ca-repairs-table :is(td):nth-child(6) input,
.ca-repairs-table :is(td):nth-child(7) input {
    width: 100% !important;
}

.ca-repair-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.ca-repair-status-completed {
    color: #166534;
}

.ca-repair-status-pending {
    color: #6b7280;
}

.ca-repair-status-meta {
    color: #15803d;
    font-weight: 600;
}

.ca-repair-complete-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ca-repair-complete-check input {
    width: 13px !important;
    height: 13px !important;
    margin: 0;
    cursor: pointer;
}

.ca-repair-complete-check input:disabled {
    cursor: wait;
}

.ca-parts-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.ca-parts-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1280px;
    font-size: 13px !important;
}

.ca-parts-table th,
.ca-parts-table td {
    padding: 4px !important;
    vertical-align: middle;
}

.ca-parts-table th {
    font-size: 12px;
    line-height: 1.1;
    white-space: normal;
}

.ca-parts-table thead th {
    text-align: center !important;
}

.ca-parts-table thead th.ca-col-product {
    text-align: left !important;
}

.ca-parts-table input:not([type="checkbox"]),
.ca-parts-table select {
    min-width: 0 !important;
    max-width: 100% !important;
    height: 29px;
    padding: 4px 5px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
}

.ca-parts-table input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
}

.ca-parts-table button {
    flex-shrink: 0;
}

.ca-parts-table .ca-col-product {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
}

.ca-parts-table .ca-col-work,
.ca-parts-table .ca-col-supplier {
    width: 122px !important;
    min-width: 122px !important;
}

.ca-parts-table .ca-col-price,
.ca-parts-table .ca-col-money,
.ca-parts-table .ca-col-total {
    width: 104px !important;
    min-width: 104px !important;
}

.ca-parts-table .ca-col-unit {
    width: 88px !important;
    min-width: 88px !important;
}

.ca-parts-table .ca-col-stock,
.ca-parts-table .ca-col-vat,
.ca-parts-table .ca-col-discount,
.ca-parts-table .ca-col-margin,
.ca-parts-table .ca-col-ordered {
    width: 50px !important;
    min-width: 50px !important;
    text-align: center;
}

.ca-parts-table td.ca-col-stock {
    vertical-align: middle !important;
}

.ca-parts-table td.ca-col-stock > span,
.ca-parts-table td.ca-col-stock > input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ca-parts-table .ca-col-quantity {
    width: 78px !important;
    min-width: 78px !important;
}

.ca-parts-table .ca-part-quantity-control {
    width: 100%;
}

.ca-parts-table .ca-part-quantity-control input {
    box-sizing: border-box;
}

.ca-parts-table .ca-part-quantity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 22px;
}

.ca-parts-table .ca-part-backorder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.05;
}

.ca-parts-table .ca-part-backorder strong {
    color: #78350f;
    font-size: 12px;
    line-height: 1.05;
}

.ca-parts-table .ca-part-backorder-spacer {
    flex: 1 1 auto;
    min-width: 0;
}

.ca-parts-table .ca-part-confirm-quantity {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #16a34a !important;
    color: #fff !important;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 800;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.ca-parts-table .ca-col-norm {
    width: 78px !important;
    min-width: 78px !important;
}

.ca-parts-table .ca-col-mechanic {
    width: 84px !important;
    min-width: 84px !important;
}

.ca-parts-table .ca-part-custom-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(72px, .8fr);
    gap: 5px;
    align-items: start;
}

.ca-parts-table .ca-col-product span,
.ca-parts-table .ca-col-product a,
.ca-parts-table .ca-col-work select,
.ca-parts-table .ca-col-supplier select,
.ca-parts-table .ca-col-mechanic select {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1440px) {
    .ca-parts-table {
        min-width: 1180px;
        font-size: 12px !important;
    }

    .ca-parts-table .ca-col-product {
        width: 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
    }

    .ca-parts-table .ca-col-work,
    .ca-parts-table .ca-col-supplier {
        width: 108px !important;
        min-width: 108px !important;
    }

    .ca-parts-table .ca-col-mechanic {
        width: 78px !important;
        min-width: 78px !important;
    }

    .ca-parts-table .ca-col-unit {
        width: 86px !important;
        min-width: 86px !important;
    }

    .ca-parts-table .ca-col-price,
    .ca-parts-table .ca-col-money,
    .ca-parts-table .ca-col-total {
        width: 96px !important;
        min-width: 96px !important;
    }
}

.fc-event {
    background: transparent !important;
    border: none !important;
}

.fc-event-main {
    padding: 0 !important;
}

/* EVENT BLOKK */
.fc-wo {
    display: flex;
    height: 100%;
    font-size: 12px;
    border: 1px dashed rgba(0,0,0,0.25);
    box-sizing: border-box;
    color: #000000;
}

.fc-wo--billed {
    border-color: rgba(88, 28, 135, 0.24);
    color: #2f1f46;
}

.fc-wo--billed .fc-wo-plate {
    background: #ffffff;
    color: #000000;
    border-color: #111827;
    box-shadow:
        0 1px 2px rgba(88, 28, 135, 0.16),
        inset 0 -1px 0 rgba(0,0,0,0.25);
}

.fc-wo--billed .fc-wo-time,
.fc-wo--billed .fc-wo-owner {
    color: #4c1d95;
    opacity: 0.88;
}

/* BAL OLDALI STÁTUSZ SÁV */
.fc-wo-status {
    width: 6px;
    flex-shrink: 0;
}

/* TARTALOM */
.fc-wo-body {
    padding: 4px 6px;
    width: 100%;
    overflow: hidden;
}

/* FEJLÉC */
.fc-wo-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    align-items: center;
}

.fc-wo-plate {
    position: relative;
    padding-left: 18px;
}

.fc-wo-plate-eu {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;

    width: 14px;
    background: #003399;
    color: #ffffff;

    font-size: 10px;
    font-weight: bold;

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

    border-right: 1px solid #000;
}

.fc-wo-plate {
    display: inline-block;
    min-width: 50px;
    padding: 4px 25px;
    padding-bottom: 0;
    background: #ffffff;
    color: #000000;

    border: 2px solid #000000;
    border-radius: 2px;

    font-family: "DIN Condensed", "Arial Narrow", monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;

    line-height: 1.15;

    box-shadow:
        inset 0 -1px 0 rgba(0,0,0,0.25);
}

.fc-wo-time {
    font-size: 11px;
    opacity: 0.8;
}

.fc-wo-item {
    display: flex;
    justify-content: space-between;
    border-top: 1px dotted rgba(0,0,0,0.25);
    padding-top: 1px;
    margin-top: 1px;
}

.fc-wo-item-time {
    opacity: 0.7;
    margin-left: 6px;
}

.fc-wo-meta {
    margin-top: 4px;
    margin-bottom: 6px;
    line-height: 1.15;
}

.fc-wo-car {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.fc-wo-owner {
    font-style: italic;
    opacity: 0.8;
    white-space: nowrap;
    margin-bottom: 3px;
}

.fc-wo-hover {
    position: absolute;
    z-index: 9999;
    width: 320px;
    border: 1px solid rgba(0,0,0,0.35);
    font-size: 12px;
    line-height: 1.18;
    display: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.fc-hover-header {
    display: flex;
    justify-content: space-between;
    padding: 4px 6px;
    color: #fff;
    font-weight: bold;
}

.fc-hover-plate {
    letter-spacing: 1px;
}

.fc-hover-body {
    padding: 6px;
}

.fc-hover-meta {
    margin-bottom: 6px;
}

.fc-hover-item {
    display: flex;
    justify-content: space-between;
    border-top: 1px dotted rgba(0,0,0,0.3);
    padding-top: 2px;
    margin-top: 2px;
}

.fc-resource-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    min-width: 0;
    line-height: 1.15;
    overflow: hidden;
}

.fc-resource-name {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    overflow: hidden;
}

.fc-resource-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-resource-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.fc-resource-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 5px;
    width: 100%;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
}

.fc .fc-col-header-cell-cushion {
    display: block;
    box-sizing: border-box;
    height: 78px;
    min-height: 78px;
    max-height: 78px;
    padding: 4px 6px !important;
    width: 100% !important;
    overflow: hidden;
}

.fc .fc-col-header-cell {
    min-width: 205px;
    vertical-align: top;
}

.fc .fc-timegrid-col {
    min-width: 205px;
}

.fc .fc-scrollgrid-section-header > th {
    background: #ffffff !important;
    z-index: 6 !important;
}

.fc-resource-comment {
    height: 32px;
    min-height: 32px !important;
    max-height: 32px;
    resize: none !important;
    overflow: hidden;
}

.fc-resource-header-absence {
    align-items: stretch;
}

.fc-resource-absence-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 100%;
    height: 16px;
    overflow: hidden;
}

.fc-resource-absence-top {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-wrap: nowrap;
    height: 16px;
    overflow: hidden;
}

.fc-resource-name-absence {
    width: 100%;
    display: block;
}

.fc-resource-worktime {
    white-space: nowrap;
}

.fc-resource-load {
    font-weight: 500;
}

.fc .fc-toolbar.fc-header-toolbar {
    margin: 0;
}

.fc .fc-timegrid-body,
.fc .fc-timegrid-body table,
.fc .fc-timegrid-slots,
.fc .fc-timegrid-cols {
    border-bottom: 1px solid var(--fc-border-color, #ddd);
}

.fc .fc-resource-disabled .fc-resource-name,
.fc .fc-resource-disabled .fc-datagrid-cell-main,
.fc .fc-resource-disabled {
  opacity: 0.65;
}

.fc .fc-timegrid-col.fc-resource-disabled {
  position: relative;
}

.fc .fc-timegrid-col.fc-resource-disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(243, 244, 246, 0.65);
  z-index: 1;
  pointer-events: none;
}

.fc .fc-resource-absence.fc-resource-disabled,
.fc .fc-resource-absence .fc-resource-name,
.fc .fc-resource-absence .fc-datagrid-cell-main {
  opacity: 1;
}

.fc .fc-resource-absence-vacation.fc-datagrid-cell,
.fc .fc-resource-absence-vacation .fc-datagrid-cell-main {
  background: #f3f4f6;
}

.fc .fc-resource-absence-sick.fc-datagrid-cell,
.fc .fc-resource-absence-sick .fc-datagrid-cell-main {
  background: #fff1f2;
}

.fc .fc-timegrid-col.fc-resource-absence-vacation,
.fc [data-resource-id].fc-resource-absence-vacation,
.fc [data-resource-id].fc-resource-absence-vacation .fc-timegrid-col-frame,
.fc [data-resource-id].fc-resource-absence-vacation .fc-timegrid-col-bg,
.fc [data-resource-id].fc-resource-absence-vacation .fc-timegrid-bg-harness {
  background-color: #eef0f3 !important;
}

.fc .fc-timegrid-col.fc-resource-absence-sick,
.fc [data-resource-id].fc-resource-absence-sick,
.fc [data-resource-id].fc-resource-absence-sick .fc-timegrid-col-frame,
.fc [data-resource-id].fc-resource-absence-sick .fc-timegrid-col-bg,
.fc [data-resource-id].fc-resource-absence-sick .fc-timegrid-bg-harness {
  background-color: #fff1f2 !important;
}

.fc .fc-timegrid-col.fc-resource-absence-vacation::after {
  background: rgba(107, 114, 128, 0.16) !important;
  box-shadow: inset 0 0 0 1px rgba(107, 114, 128, 0.24);
}

.fc .fc-timegrid-col.fc-resource-absence-sick::after {
  background: rgba(254, 205, 211, 0.38);
}

.fc-resource-absence-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.fc-resource-absence-badge-vacation {
    background: #dcfce7;
    color: #166534;
}

.fc-resource-absence-badge-sick {
    background: #fee2e2;
    color: #991b1b;
}

.ca-team-attendance {
    margin-top: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.ca-team-attendance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ca-team-attendance-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.ca-team-attendance-meta {
    margin-top: 2px;
    font-size: 13px;
    color: #6b7280;
}

.ca-team-attendance-toggle {
    flex: 0 0 auto;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
}

.ca-team-attendance-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
}

.ca-team-attendance-group {
    min-width: 0;
}

.ca-team-attendance-group-title {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #4b5563;
    text-transform: uppercase;
}

.ca-team-attendance-users {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ca-team-attendance-user {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    max-width: 100%;
    min-width: 190px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    padding: 7px 8px;
}

.ca-team-attendance-user--vacation {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ca-team-attendance-user--sick {
    border-color: #fecdd3;
    background: #fff1f2;
}

.ca-team-attendance-user-name,
.ca-team-attendance-status {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ca-team-attendance-user-name {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.ca-team-attendance-status {
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
}

.ca-attendance-action {
  width: 24px;
  height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #ffffff;
    color: #374151;
    font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.ca-attendance-dialog {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ca-attendance-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.ca-attendance-dialog-card {
  position: relative;
  width: min(360px, 100%);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
  padding: 14px;
}

.ca-attendance-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ca-attendance-dialog-title {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.ca-attendance-dialog-subtitle {
  margin-top: 2px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.ca-attendance-dialog-close {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #374151;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.ca-attendance-dialog-field {
  display: grid;
  gap: 5px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.ca-attendance-dialog-field input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  padding: 8px 9px;
  font-size: 15px;
  font-weight: 700;
}

.ca-attendance-dialog-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ca-attendance-dialog-submit {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-weight: 900;
}

.ca-attendance-dialog-submit--vacation,
.ca-attendance-dialog-submit--workday {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.ca-attendance-dialog-submit--sick {
  border-color: #fecdd3;
  background: #fee2e2;
  color: #991b1b;
}

.ca-team-attendance-empty,
.ca-team-attendance-loading {
  border: 1px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
    padding: 10px;
}

html.dark .ca-team-attendance {
    border-color: #334155;
    background: #111827;
}

html.dark .ca-team-attendance-title,
html.dark .ca-team-attendance-user-name {
    color: #f8fafc;
}

html.dark .ca-team-attendance-meta,
html.dark .ca-team-attendance-status,
html.dark .ca-team-attendance-group-title,
html.dark .ca-team-attendance-empty,
html.dark .ca-team-attendance-loading {
    color: #9ca3af;
}

html.dark .ca-team-attendance-toggle,
html.dark .ca-attendance-action,
html.dark .ca-team-attendance-user {
    border-color: #334155;
    background: #1f2937;
    color: #e5e7eb;
}

html.dark .ca-team-attendance-user--vacation {
    border-color: #166534;
    background: rgba(20, 83, 45, 0.34);
}

html.dark .ca-team-attendance-user--sick {
  border-color: #991b1b;
  background: rgba(127, 29, 29, 0.34);
}

html.dark .ca-attendance-dialog-card,
html.dark .ca-attendance-dialog-close,
html.dark .ca-attendance-dialog-field input {
  border-color: #334155;
  background: #111827;
  color: #e5e7eb;
}

html.dark .ca-attendance-dialog-title {
  color: #f8fafc;
}

html.dark .ca-attendance-dialog-subtitle,
html.dark .ca-attendance-dialog-field {
  color: #9ca3af;
}

html.dark {
  --ca-dark-bg: #090d13;
    --ca-dark-elevated: #0f172a;
    --ca-dark-panel: #111827;
    --ca-dark-panel-soft: #182231;
    --ca-dark-panel-muted: #1f2937;
    --ca-dark-border: #2b3647;
    --ca-dark-border-strong: #3b4657;
    --ca-dark-text: #e5e7eb;
    --ca-dark-text-strong: #f8fafc;
    --ca-dark-muted: #9ca3af;
    --ca-dark-faint: #6b7280;
    --ca-dark-focus: #fb7185;
    --ca-dark-accent: #e11d48;
    --ca-surface: var(--ca-dark-panel);
    --ca-surface-soft: var(--ca-dark-panel-soft);
    --ca-border: var(--ca-dark-border);
    --ca-text: var(--ca-dark-text);
    --ca-muted: var(--ca-dark-muted);
    --fc-page-bg-color: var(--ca-dark-bg);
    --fc-neutral-bg-color: var(--ca-dark-panel-soft);
    --fc-border-color: var(--ca-dark-border);
    --fc-today-bg-color: rgba(225, 29, 72, 0.16) !important;
    color-scheme: dark;
}

html.dark body,
html.dark .fi-body,
html.dark .fi-main {
    background: var(--ca-dark-bg) !important;
    color: var(--ca-dark-text);
}

html.dark .fi-topbar,
html.dark .fi-sidebar,
html.dark .fi-sidebar-header,
html.dark .fi-sidebar-nav {
    background: #111318 !important;
    border-color: var(--ca-dark-border) !important;
}

html.dark .fi-modal-window,
html.dark .fi-modal-header,
html.dark .fi-modal-footer {
    background: var(--ca-dark-panel) !important;
    border-color: var(--ca-dark-border) !important;
    color: var(--ca-dark-text) !important;
}

html.dark .fi-modal-heading,
html.dark .fi-section-header-heading,
html.dark .fi-ta-header-heading {
    color: var(--ca-dark-text-strong) !important;
}

html.dark .ca-email-template-section {
    border-left-color: #fb7185 !important;
}

html.dark .ca-email-template-section .fi-section-header {
    background: rgba(127, 29, 29, 0.28) !important;
}

html.dark .ca-email-template-section .fi-section-header-heading {
    color: #fecdd3 !important;
}

html.dark .ca-email-rich-editor.fi-fo-rich-editor {
    border-color: var(--ca-dark-border-strong) !important;
    background: #111827 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html.dark .ca-email-rich-editor .fi-fo-rich-editor-toolbar {
    border-bottom-color: var(--ca-dark-border);
    background: linear-gradient(180deg, #182231 0%, #111827 100%);
}

html.dark .ca-email-rich-editor .fi-fo-rich-editor-toolbar-group {
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
}

html.dark .ca-email-rich-editor .fi-fo-rich-editor-main,
html.dark .ca-email-rich-editor .fi-fo-rich-editor-content {
    background-color: #0b1220;
}

html.dark .ca-email-rich-editor .fi-fo-rich-editor-content {
    background:
        linear-gradient(90deg, rgba(75, 85, 99, 0.18) 1px, transparent 1px),
        linear-gradient(180deg, rgba(75, 85, 99, 0.18) 1px, transparent 1px),
        #0b1220;
}

html.dark .ca-email-rich-editor .fi-fo-rich-editor-content table {
    background: rgba(15, 23, 42, 0.78);
}

html.dark .fi-modal-content {
    background: linear-gradient(180deg, #101827 0%, #0c111b 100%) !important;
}

html.dark .fc {
    background: var(--ca-dark-bg);
    color: var(--ca-dark-text);
}

html.dark .fc .fc-scrollgrid,
html.dark .fc .fc-view-harness,
html.dark .fc .fc-timegrid,
html.dark .fc .fc-timegrid-body,
html.dark .fc .fc-timegrid-slots,
html.dark .fc .fc-timegrid-cols,
html.dark .fc .fc-timegrid-slots table,
html.dark .fc .fc-timegrid-cols table {
    background: var(--ca-dark-panel) !important;
}

html.dark .fc-theme-standard td,
html.dark .fc-theme-standard th,
html.dark .fc-theme-standard .fc-scrollgrid,
html.dark .fc .fc-timegrid-slot,
html.dark .fc .fc-timegrid-col,
html.dark .fc .fc-timegrid-axis,
html.dark .fc .fc-col-header-cell {
    border-color: var(--ca-dark-border) !important;
}

html.dark .fc .fc-timegrid-slot {
    background: #111827 !important;
}

html.dark .fc .fc-timegrid-slot-minor {
    border-color: #202a39 !important;
}

html.dark .fc .fc-timegrid-slot:nth-child(4n),
html.dark .fc .fc-timegrid-col:nth-child(even) {
    background: #131d2b !important;
}

html.dark .fc .fc-col-header-cell,
html.dark .fc .fc-datagrid-cell,
html.dark .fc .fc-resource-timeline-divider {
    background: #0d1320 !important;
    color: var(--ca-dark-text-strong) !important;
}

html.dark .fc .fc-timegrid-axis,
html.dark .fc .fc-timegrid-slot-label {
    background: #0b1018 !important;
    color: #d1d5db !important;
}

html.dark .fc .fc-resource-disabled .fc-resource-name,
html.dark .fc .fc-resource-disabled .fc-datagrid-cell-main,
html.dark .fc .fc-resource-disabled {
    opacity: 0.48;
}

html.dark .fc .fc-timegrid-col.fc-resource-disabled::after {
    background: rgba(15, 23, 42, 0.72) !important;
}

html.dark .fc .fc-timegrid-col.fc-resource-absence-vacation::after {
    background: rgba(148, 163, 184, 0.22) !important;
}

html.dark .fc .fc-timegrid-col.fc-resource-absence-sick::after {
    background: rgba(127, 29, 29, 0.46) !important;
}

html.dark .fc .fc-resource-absence.fc-resource-disabled,
html.dark .fc .fc-resource-absence .fc-resource-name,
html.dark .fc .fc-resource-absence .fc-datagrid-cell-main {
    opacity: 1;
}

html.dark .fc-resource-meta {
    color: var(--ca-dark-muted);
}

html.dark .fc-wo {
    border-color: rgba(226, 232, 240, 0.42);
    color: #f8fafc;
}

html.dark .fc-wo--billed {
    border-color: rgba(88, 28, 135, 0.34);
    color: #2f1f46;
}

html.dark .fc-wo--billed .fc-wo-time,
html.dark .fc-wo--billed .fc-wo-owner {
    color: #4c1d95;
}

html.dark .fc-wo-item,
html.dark .fc-hover-item {
    border-color: rgba(226, 232, 240, 0.28);
}

html.dark .pika-single {
    background: var(--ca-dark-panel) !important;
    border-color: var(--ca-dark-border) !important;
    color: var(--ca-dark-text) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

html.dark .pika-label,
html.dark .pika-title select {
    background: var(--ca-dark-panel) !important;
    color: var(--ca-dark-text-strong) !important;
}

html.dark .pika-table th,
html.dark .pika-table abbr {
    color: var(--ca-dark-muted) !important;
}

html.dark .pika-button {
    background: var(--ca-dark-panel-soft) !important;
    color: var(--ca-dark-text) !important;
}

html.dark .pika-button:hover,
html.dark .is-today .pika-button {
    background: rgba(244, 63, 94, 0.18) !important;
    color: #fecdd3 !important;
}

html.dark .is-selected .pika-button {
    background: var(--ca-dark-accent) !important;
    color: #fff !important;
    box-shadow: none !important;
}

html.dark .wo-top-row {
    background: linear-gradient(135deg, #151f2e 0%, #101827 100%);
    border-color: var(--ca-dark-border-strong);
}

html.dark .wo-card {
    background: linear-gradient(145deg, #151f2e 0%, #111827 58%, #0d1420 100%);
    border-color: var(--ca-dark-border);
    box-shadow: 0 18px 38px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html.dark .wo-card-title,
html.dark .wo-label,
html.dark .wo-owner-suggestion-name {
    color: var(--ca-dark-text-strong);
}

html.dark .wo-label {
    letter-spacing: 0.04em;
}

html.dark .wo-input,
html.dark .wo-textarea,
html.dark .fi-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html.dark .fi-modal select,
html.dark .fi-modal textarea {
    background-color: #0b1220 !important;
    border-color: var(--ca-dark-border-strong) !important;
    color: var(--ca-dark-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.22);
}

html.dark .wo-input::placeholder,
html.dark .wo-textarea::placeholder,
html.dark .fi-modal input::placeholder,
html.dark .fi-modal textarea::placeholder {
    color: var(--ca-dark-faint) !important;
}

html.dark .wo-input:focus,
html.dark .wo-textarea:focus,
html.dark .fi-modal input:not([type="checkbox"]):not([type="radio"]):focus,
html.dark .fi-modal select:focus,
html.dark .fi-modal textarea:focus {
    border-color: var(--ca-dark-focus) !important;
    box-shadow: 0 0 0 1px var(--ca-dark-focus), 0 0 0 4px rgba(244, 63, 94, 0.15) !important;
    background-color: #101827 !important;
}

html.dark .wo-owner-suggestions {
    background: #101827;
    border-color: var(--ca-dark-border);
    box-shadow: 0 22px 36px -18px rgba(0, 0, 0, 0.75);
}

html.dark .wo-owner-suggestion-item {
    color: var(--ca-dark-text);
}

html.dark .wo-owner-suggestion-item:hover {
    background: #1f2937;
}

html.dark .wo-owner-suggestion-meta,
html.dark .wo-pill {
    color: var(--ca-dark-muted);
}

html.dark .wo-pill {
    background: rgba(251, 113, 133, 0.13);
    border-color: rgba(251, 113, 133, 0.28);
}

html.dark .fi-modal-tabs {
    border-color: var(--ca-dark-border);
}

html.dark .fi-modal-tab {
    background: #182231;
    color: var(--ca-dark-text);
    border: 1px solid var(--ca-dark-border);
}

html.dark .fi-modal-tab:hover {
    background: #233044;
    color: var(--ca-dark-text-strong);
}

html.dark .fi-modal-tab.is-active {
    background: linear-gradient(135deg, #e11d48, #be123c);
    border-color: #fb7185;
    color: #fff;
}

html.dark .fi-modal-tab.is-active:hover {
    background: linear-gradient(135deg, #f43f5e, #be123c);
}

html.dark .fi-main [style*="background:#fff;"],
html.dark .fi-main [style*="background: #fff;"],
html.dark .fi-main [style*="background:white"],
html.dark .fi-main [style*="background: white"],
html.dark .fi-main [style*="background:#ffffff"],
html.dark .fi-main [style*="background: #ffffff"],
html.dark .fi-modal [style*="background:#fff;"],
html.dark .fi-modal [style*="background: #fff;"],
html.dark .fi-modal [style*="background:white"],
html.dark .fi-modal [style*="background: white"],
html.dark .fi-modal [style*="background:#ffffff"],
html.dark .fi-modal [style*="background: #ffffff"] {
    background: var(--ca-dark-panel) !important;
}

html.dark .fi-main [style*="background:#f9fafb"],
html.dark .fi-main [style*="background: #f9fafb"],
html.dark .fi-main [style*="background:#f3f4f6"],
html.dark .fi-main [style*="background: #f3f4f6"],
html.dark .fi-main [style*="background:#fafafa"],
html.dark .fi-main [style*="background: #fafafa"],
html.dark .fi-modal [style*="background:#f9fafb"],
html.dark .fi-modal [style*="background: #f9fafb"],
html.dark .fi-modal [style*="background:#f3f4f6"],
html.dark .fi-modal [style*="background: #f3f4f6"],
html.dark .fi-modal [style*="background:#fafafa"],
html.dark .fi-modal [style*="background: #fafafa"] {
    background: var(--ca-dark-panel-soft) !important;
}

html.dark .fi-main [style*="border:1px solid #e5e7eb"],
html.dark .fi-main [style*="border: 1px solid #e5e7eb"],
html.dark .fi-main [style*="border:1px solid #d1d5db"],
html.dark .fi-main [style*="border: 1px solid #d1d5db"],
html.dark .fi-modal [style*="border:1px solid #e5e7eb"],
html.dark .fi-modal [style*="border: 1px solid #e5e7eb"],
html.dark .fi-modal [style*="border:1px solid #d1d5db"],
html.dark .fi-modal [style*="border: 1px solid #d1d5db"] {
    border-color: var(--ca-dark-border) !important;
}

html.dark .fi-main [style*="color:#111827"],
html.dark .fi-main [style*="color: #111827"],
html.dark .fi-modal [style*="color:#111827"],
html.dark .fi-modal [style*="color: #111827"] {
    color: var(--ca-dark-text-strong) !important;
}

html.dark .fi-main [style*="color:#374151"],
html.dark .fi-main [style*="color: #374151"],
html.dark .fi-modal [style*="color:#374151"],
html.dark .fi-modal [style*="color: #374151"] {
    color: var(--ca-dark-text) !important;
}

html.dark .fi-main [style*="color:#4b5563"],
html.dark .fi-main [style*="color: #4b5563"],
html.dark .fi-main [style*="color:#6b7280"],
html.dark .fi-main [style*="color: #6b7280"],
html.dark .fi-main [style*="color:#9ca3af"],
html.dark .fi-main [style*="color: #9ca3af"],
html.dark .fi-modal [style*="color:#4b5563"],
html.dark .fi-modal [style*="color: #4b5563"],
html.dark .fi-modal [style*="color:#6b7280"],
html.dark .fi-modal [style*="color: #6b7280"],
html.dark .fi-modal [style*="color:#9ca3af"],
html.dark .fi-modal [style*="color: #9ca3af"] {
    color: var(--ca-dark-muted) !important;
}

html.dark .fi-main [style*="background:#eef2ff"],
html.dark .fi-main [style*="background: #eef2ff"],
html.dark .fi-main [style*="background:#f5f3ff"],
html.dark .fi-main [style*="background: #f5f3ff"],
html.dark .fi-modal [style*="background:#eef2ff"],
html.dark .fi-modal [style*="background: #eef2ff"],
html.dark .fi-modal [style*="background:#f5f3ff"],
html.dark .fi-modal [style*="background: #f5f3ff"] {
    background: rgba(99, 102, 241, 0.18) !important;
    border-color: rgba(129, 140, 248, 0.34) !important;
    color: #c7d2fe !important;
}

html.dark .fi-main [style*="background:#fee2e2"],
html.dark .fi-main [style*="background: #fee2e2"],
html.dark .fi-main [style*="background:#fef2f2"],
html.dark .fi-main [style*="background: #fef2f2"],
html.dark .fi-modal [style*="background:#fee2e2"],
html.dark .fi-modal [style*="background: #fee2e2"],
html.dark .fi-modal [style*="background:#fef2f2"],
html.dark .fi-modal [style*="background: #fef2f2"] {
    background: rgba(244, 63, 94, 0.14) !important;
    border-color: rgba(251, 113, 133, 0.34) !important;
    color: #fecdd3 !important;
}

html.dark .fi-main [style*="background:#fff7ed"],
html.dark .fi-main [style*="background: #fff7ed"],
html.dark .fi-main [style*="background:#ffedd5"],
html.dark .fi-main [style*="background: #ffedd5"],
html.dark .fi-modal [style*="background:#fff7ed"],
html.dark .fi-modal [style*="background: #fff7ed"],
html.dark .fi-modal [style*="background:#ffedd5"],
html.dark .fi-modal [style*="background: #ffedd5"] {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(251, 191, 36, 0.32) !important;
    color: #fde68a !important;
}

html.dark [style*="background:#fff;"]:not(.fc-wo-plate),
html.dark [style*="background: #fff;"]:not(.fc-wo-plate),
html.dark [style*="background:white"],
html.dark [style*="background: white"],
html.dark [style*="background:#ffffff"],
html.dark [style*="background: #ffffff"] {
    background: var(--ca-dark-panel) !important;
}

html.dark [style*="background:#f9fafb"],
html.dark [style*="background: #f9fafb"],
html.dark [style*="background:#f8fafc"],
html.dark [style*="background: #f8fafc"],
html.dark [style*="background:#f3f4f6"],
html.dark [style*="background: #f3f4f6"],
html.dark [style*="background:#fafafa"],
html.dark [style*="background: #fafafa"] {
    background: var(--ca-dark-panel-soft) !important;
}

html.dark [style*="border:1px solid #e5e7eb"],
html.dark [style*="border: 1px solid #e5e7eb"],
html.dark [style*="border-bottom:1px solid #eef2f7"],
html.dark [style*="border-bottom: 1px solid #eef2f7"],
html.dark [style*="border:1px solid #d1d5db"],
html.dark [style*="border: 1px solid #d1d5db"],
html.dark [style*="border-top:1px solid #e5e7eb"],
html.dark [style*="border-top: 1px solid #e5e7eb"] {
    border-color: var(--ca-dark-border) !important;
}

html.dark [style*="color:#111827"],
html.dark [style*="color: #111827"] {
    color: var(--ca-dark-text-strong) !important;
}

html.dark [style*="color:#374151"],
html.dark [style*="color: #374151"],
html.dark [style*="color:#4b5563"],
html.dark [style*="color: #4b5563"] {
    color: var(--ca-dark-text) !important;
}

html.dark [style*="color:#6b7280"],
html.dark [style*="color: #6b7280"],
html.dark [style*="color:#9ca3af"],
html.dark [style*="color: #9ca3af"] {
    color: var(--ca-dark-muted) !important;
}

.fi-modal:has(.ca-workorder-modal-shell) {
    z-index: 9999 !important;
}

#calendar-open-workorder-choice-modal {
    z-index: 10020 !important;
}

#calendar-open-workorder-choice-modal .fi-modal-close-overlay,
#calendar-open-workorder-choice-modal .fi-modal-window-ctn {
    z-index: 10021 !important;
}

.ca-workorder-modal-footer {
    min-width: 0;
}

.ca-workorder-modal-footer :where(button, a, .fi-btn) {
    min-height: 28px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
}

.ca-workorder-modal-footer select {
    min-height: 28px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
}

.ca-workorder-footer-actions {
    min-width: 0;
}

.ca-workorder-footer-actions > span {
    gap: 4px !important;
}

.ca-workorder-footer-summary {
    min-width: 0;
}

.ca-workorder-footer-summary > div {
    min-width: 0;
}

.ca-workorder-footer-summary [style*="font-size:13px"] {
    font-size: 12px !important;
}

@media (max-width: 1180px) {
    .fi-modal-window:has(.ca-workorder-modal-shell) {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }
}

@media (max-width: 1024px) {
    .fi-modal-window:has(.ca-workorder-modal-shell) {
        max-height: calc(100dvh - 16px);
        margin: 8px;
        border-radius: 14px;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-header {
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-content {
        max-height: calc(100dvh - 104px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ca-workorder-modal-shell {
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .ca-workorder-modal-shell :where(form, section, div) {
        min-width: 0;
    }

    .ca-workorder-modal-shell .fi-modal-tabs {
        gap: 6px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .ca-workorder-modal-shell .fi-modal-tab {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-height: 38px;
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .ca-workorder-modal-shell .wo-top-row {
        gap: 8px;
        padding: 8px;
    }

    .ca-workorder-modal-shell .wo-top-row .wo-field {
        flex: 1 1 190px;
        min-width: min(190px, 100%);
    }

    .ca-workorder-modal-shell .wo-field-group-inline {
        flex-wrap: wrap;
    }

    .ca-workorder-modal-shell .wo-field-group-inline .wo-field {
        flex: 1 1 180px;
    }

    .ca-workorder-modal-shell .wo-card {
        height: auto;
    }

    .ca-workorder-task-form {
        grid-template-columns: minmax(0, 1fr) minmax(170px, .75fr) minmax(120px, .55fr) auto !important;
    }
}

@media (max-width: 760px) {
    .fi-modal:has(.ca-workorder-modal-shell) {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
    }

    .fi-modal-window-ctn:has(.ca-workorder-modal-shell) {
        width: 100vw !important;
        height: 100dvh !important;
        padding: 4px !important;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) {
        width: calc(100vw - 8px) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 8px) !important;
        height: calc(100dvh - 8px);
        max-height: calc(100dvh - 8px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        margin: 0 !important;
        border-radius: 12px;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-header {
        flex: 0 0 auto;
        position: relative;
        z-index: 40;
        padding: 10px 12px !important;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-content {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        position: relative;
        z-index: 10;
        padding: 8px !important;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-footer {
        flex: 0 0 auto;
        position: relative;
        z-index: 50;
        max-height: min(240px, 34dvh);
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px !important;
        background: var(--fi-modal-footer-bg, #fff);
        pointer-events: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-footer > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-footer > div > div {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-footer > div > div > * {
        flex: 1 1 calc(50% - 3px) !important;
        min-width: 0 !important;
        max-width: calc(50% - 3px) !important;
    }

    .fi-modal-window:has(.ca-workorder-modal-shell) .fi-modal-footer :where(button, a) {
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 32px;
        white-space: normal !important;
        text-align: center;
    }

    .ca-workorder-modal-heading {
        width: 100%;
    }

    .ca-workorder-modal-heading-title {
        font-size: 17px;
        line-height: 1.15;
    }

    .ca-workorder-modal-refresh-button {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 13px;
    }

    .ca-workorder-modal-shell {
        gap: 10px;
    }

    .ca-workorder-modal-shell .fi-modal-tabs {
        margin-inline: -2px;
    }

    .ca-workorder-modal-shell .fi-modal-tab {
        min-height: 36px;
        padding: 7px 9px;
        border-radius: 8px;
        font-size: 12px;
    }

    .ca-workorder-modal-shell .wo-modal-form {
        gap: 10px;
    }

    .ca-workorder-modal-shell .wo-top-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ca-workorder-modal-shell .wo-address-row,
    .ca-workorder-modal-shell .wo-address-row-2,
    .ca-workorder-modal-shell .wo-address-row-3,
    .ca-workorder-modal-shell .wo-address-row-4 {
        grid-template-columns: 1fr !important;
    }

    .ca-workorder-modal-shell .wo-field-group-inline,
    .ca-workorder-modal-shell .wo-work-day-time-row,
    .ca-workorder-modal-shell .wo-work-group-insert-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .ca-workorder-modal-shell .wo-field-group-inline .wo-field {
        flex: 0 1 auto !important;
        width: 100%;
    }

    .ca-workorder-modal-shell .wo-work-days-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }

    .ca-workorder-modal-shell .wo-work-day-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .ca-workorder-modal-shell .wo-add-work-day-button {
        width: 100%;
    }

    .ca-workorder-modal-shell .wo-work-header {
        display: none !important;
    }

    .ca-workorder-modal-shell .wo-work-body {
        gap: 10px !important;
    }

    .ca-workorder-modal-shell .wo-work-row {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 10px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #ffffff;
    }

    .ca-workorder-modal-shell .wo-work-cell {
        display: block !important;
    }

    .ca-workorder-modal-shell .wo-work-cell::before {
        display: block;
        margin-bottom: 4px;
        color: #4b5563;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.04em;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .ca-workorder-modal-shell .wo-work-cell:nth-child(1)::before {
        content: "Megnevezés";
    }

    .ca-workorder-modal-shell .wo-work-cell:nth-child(2)::before {
        content: "Cikkszám";
    }

    .ca-workorder-modal-shell .wo-work-cell:nth-child(3)::before {
        content: "Idő (óra)";
    }

    .ca-workorder-modal-shell .wo-work-cell:nth-child(4) {
        align-items: stretch !important;
        justify-content: stretch !important;
    }

    .ca-workorder-modal-shell .wo-work-cell:nth-child(4) button {
        width: 100%;
        min-height: 34px;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        background: #f9fafb !important;
    }

    .ca-workorder-modal-shell .wo-gross-panel-grid,
    .ca-workorder-modal-shell .wo-gross-summary-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .ca-workorder-modal-shell .wo-gross-table-card,
    .ca-workorder-modal-shell .wo-gross-table-card-wide {
        grid-column: 1 / -1 !important;
    }

    .ca-workorder-task-form {
        grid-template-columns: 1fr !important;
    }

    .ca-workorder-task-form > div,
    .ca-workorder-task-form > button {
        grid-column: auto !important;
        width: 100%;
    }

    .ca-workorder-table-wrap {
        max-width: 100%;
    }

    .ca-workorder-task-table {
        min-width: 680px;
    }

    .ca-workorder-invoices-header,
    .ca-workorder-invoices-header > div:first-child,
    .ca-workorder-invoices-header > div:last-child {
        align-items: flex-start !important;
        width: 100%;
    }

    .ca-workorder-invoices-header {
        flex-direction: column;
    }

    .ca-workorder-invoice-totals {
        grid-template-columns: 1fr !important;
    }

    .ca-repairs-table-wrap,
    .ca-parts-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .ca-repairs-table {
        min-width: 1360px;
    }

    .ca-parts-table {
        min-width: 980px;
    }
}

@media (max-width: 480px) {
    .ca-workorder-modal-shell .wo-card {
        padding: 10px;
        border-radius: 10px;
    }

    .ca-workorder-modal-shell .wo-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .ca-workorder-modal-shell .wo-input,
    .ca-workorder-modal-shell .wo-textarea {
        min-height: 36px;
        font-size: 14px;
    }

    .ca-workorder-modal-shell .ca-parts-table,
    .ca-workorder-modal-shell .ca-repairs-table {
        font-size: 13px !important;
    }
}

html.dark .ca-workorder-modal-shell .wo-work-row {
    background: var(--ca-dark-panel) !important;
    border-color: var(--ca-dark-border) !important;
}

html.dark .ca-workorder-modal-shell .wo-work-cell::before {
    color: var(--ca-dark-muted) !important;
}

.fi-no {
    top: 16px !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    align-items: stretch !important;
    width: min(calc(100vw - 32px), 384px) !important;
    margin-inline: 0 !important;
    transform: translateX(-50%) !important;
}

.fi-no .fi-no-notification:not(.fi-inline) {
    max-width: none !important;
}

@media (max-width: 640px) {
    .fi-no {
        top: auto !important;
        right: 16px !important;
        bottom: 16px !important;
        left: auto !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        width: min(calc(100vw - 32px), 384px) !important;
        transform: none !important;
    }
}
