body:has(.crm-app) header,
body:has(.crm-app) main > h1 {
    display: none !important;
}

.crm-app,
.crm-app * {
    box-sizing: border-box;
}

.crm-app {
    --crm-primary: #2563eb;
    --crm-primary-dark: #1d4ed8;
    --crm-primary-soft: #dbeafe;
    --crm-success: #16a34a;
    --crm-warning: #f59e0b;
    --crm-danger: #dc2626;
    --crm-bg: #f3f6fb;
    --crm-surface: #fff;
    --crm-surface-soft: #f8fafc;
    --crm-text: #0f172a;
    --crm-muted: #64748b;
    --crm-border: #e2e8f0;
    --crm-radius: 14px;
    --crm-radius-lg: 22px;
    --crm-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --crm-card-padding: 22px;
    --crm-main-padding: 28px;
    --crm-sidebar-padding: 24px;
    --crm-field-font-size: 15px;
    font-size: var(--crm-app-font-size, 16px);

    width: 100%;
    max-width: 100% !important;
    margin: 0;
    min-height: 760px;
    background: var(--crm-bg);
    color: var(--crm-text);
    font-family: inherit;
}

.crm-radius-none { --crm-radius: 0px; --crm-radius-lg: 0px; }
.crm-radius-compact { --crm-radius: 8px; --crm-radius-lg: 12px; }
.crm-radius-normal { --crm-radius: 14px; --crm-radius-lg: 22px; }
.crm-radius-comfortable { --crm-radius: 18px; --crm-radius-lg: 28px; }
.crm-radius-large { --crm-radius: 24px; --crm-radius-lg: 36px; }

.crm-padding-compact { --crm-card-padding: 14px; --crm-main-padding: 18px; --crm-sidebar-padding: 18px; }
.crm-padding-normal { --crm-card-padding: 22px; --crm-main-padding: 28px; --crm-sidebar-padding: 24px; }
.crm-padding-comfortable { --crm-card-padding: 28px; --crm-main-padding: 34px; --crm-sidebar-padding: 30px; }
.crm-padding-large { --crm-card-padding: 36px; --crm-main-padding: 42px; --crm-sidebar-padding: 36px; }

.crm-font-compact { --crm-app-font-size: 14px; --crm-field-font-size: 14px; }
.crm-font-normal { --crm-app-font-size: 16px; --crm-field-font-size: 15px; }
.crm-font-comfortable { --crm-app-font-size: 17px; --crm-field-font-size: 16px; }
.crm-font-large { --crm-app-font-size: 18px; --crm-field-font-size: 17px; }

.crm-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 760px;
}

.crm-sidebar {
    background: #0f172a;
    color: #fff;
    padding: var(--crm-sidebar-padding, 24px);
}

.crm-main {
    padding: var(--crm-main-padding, 28px);
    min-width: 0;
}

.crm-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.crm-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--crm-primary);
    color: #fff;
    font-weight: 900;
}

.crm-brand strong,
.crm-brand span {
    display: block;
}

.crm-brand span {
    color: #b6c2d9;
    font-size: 13px;
}

.crm-menu {
    display: grid;
    gap: 8px;
}

.crm-menu a {
    display: block;
    padding: 13px 14px;
    border-radius: var(--crm-radius);
    color: #d9e2f3 !important;
    text-decoration: none;
    font-weight: 700;
}

.crm-menu a:hover,
.crm-menu a.active {
    background: rgba(255,255,255,.12);
    color: #fff !important;
}

.crm-topbar,
.crm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.crm-topbar h1,
.crm-card-title {
    margin: 0;
    color: var(--crm-text);
}

.crm-topbar p,
.crm-section-head p {
    margin: 4px 0 0;
    color: var(--crm-muted);
}

.crm-user-badge {
    background: var(--crm-primary-soft);
    color: var(--crm-primary-dark);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
}

.crm-grid {
    display: grid;
    gap: 16px;
}

.crm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.crm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.crm-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.crm-card,
.crm-stat,
.crm-module {
    background: var(--crm-surface);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    padding: var(--crm-card-padding, 22px);
    box-shadow: var(--crm-shadow);
}

.crm-panel { margin-top: 18px; }

.crm-module {
    text-decoration: none !important;
    color: var(--crm-text) !important;
    display: grid;
    gap: 6px;
}

.crm-module span {
    color: var(--crm-muted);
}

.crm-stat span {
	display: block;
    margin-bottom: 8px;
    color: #eaa633;
    font-size: 14px;
}

.crm-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
	font-weight: 600;
}

.crm-form {
    display: grid;
    gap: 18px;
}

.crm-field {
    display: grid;
    gap: 7px;
}

.crm-field label {
    font-weight: 800;
}

.crm-field input,
.crm-field select,
.crm-field textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 10px 13px;
    background: #fff;
    color: var(--crm-text);
    font-size: var(--crm-field-font-size, 15px);
}

.crm-field textarea {
    min-height: 120px;
    resize: vertical;
}

.crm-field input:focus,
.crm-field select:focus,
.crm-field textarea:focus {
    outline: none;
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px var(--crm-primary-soft);
}

.crm-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.crm-button,
.crm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--crm-radius);
    background: var(--crm-primary);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    cursor: pointer;
    transition: .18s ease;
}

.crm-button:hover,
.crm-btn:hover {
    background: var(--crm-primary-dark);
}

.crm-btn-secondary {
    background: var(--crm-surface-soft);
    color: var(--crm-text) !important;
    border: 1px solid var(--crm-border);
}

.crm-btn-danger {
    background: var(--crm-danger);
}

.crm-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--crm-radius-lg);
    overflow: hidden;
}

.crm-table th,
.crm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--crm-border);
    text-align: left;
    vertical-align: middle;
}

.crm-table th {
    background: var(--crm-surface-soft);
    font-weight: 900;
}

.crm-table td small,
.crm-mini-line {
    display: block;
    margin-top: 4px;
    color: var(--crm-muted);
}

.crm-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    background: var(--crm-primary-soft);
    color: var(--crm-primary-dark);
    margin: 2px;
}

.crm-badge-success { background: #dcfce7; color: #166534; }
.crm-badge-warning { background: #fef3c7; color: #92400e; }
.crm-badge-danger { background: #fee2e2; color: #991b1b; }

.crm-progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.crm-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--crm-primary);
}

.crm-empty,
.crm-soft {
    padding: var(--crm-card-padding, 22px);
    background: var(--crm-surface-soft);
    border: 1px dashed var(--crm-border);
    border-radius: var(--crm-radius);
}

.crm-alert {
    padding: 16px 18px;
    border-radius: var(--crm-radius);
    margin-bottom: 18px;
}

.crm-alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.crm-alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.crm-inline-form {
    display: inline-flex;
    margin-left: 6px;
}

.crm-checkbox-list {
    display: grid;
    gap: 10px;
}

.crm-checkbox-list label {
    background: var(--crm-surface-soft);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 12px;
}

.ecrm-custom-unit,
.ecrm-new-workflow,
.ecrm-new-cost-type,
.ecrm-wp-user-fields {
    display: none;
}

.ecrm-show {
    display: grid !important;
}

@media (max-width: 1000px) {
    .crm-layout { grid-template-columns: 1fr; }
    .crm-sidebar, .crm-main { padding: 18px; }
    .crm-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crm-topbar, .crm-section-head { align-items: flex-start; flex-direction: column; }
    .crm-grid-2, .crm-grid-3, .crm-grid-4, .crm-grid-5 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .crm-menu { grid-template-columns: 1fr; }
    .crm-main { padding: 12px; }
}

.crm-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f3f6fb;
    padding: 24px;
}

.crm-login-card {
    width: min(100%, 460px);
}

.crm-login-card .crm-logo {
    margin-bottom: 18px;
}

.crm-login-card h1 {
    margin: 0 0 6px;
}

.crm-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--crm-muted);
    font-weight: 700;
}

.crm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.crm-btn-active {
    background: var(--crm-primary) !important;
    color: #fff !important;
    border-color: var(--crm-primary) !important;
}

.crm-permission-worker-select {
    margin-bottom: 18px;
}


/* V1.4 dashboard / reports */
.crm-stat small,
.crm-list-item small {
    display: block;
    margin-top: 4px;
    color: var(--crm-muted);
    font-size: 13px;
}

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

.crm-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    background: var(--crm-surface-soft);
    color: var(--crm-text);
    text-decoration: none;
}

.crm-list-item:hover {
    background: #fff;
}

.crm-list-progress {
    width: 160px;
    max-width: 45%;
    display: grid;
    gap: 6px;
    text-align: right;
}

.crm-list-value {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .crm-list-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-list-progress,
    .crm-list-value {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }
}


/* CRM belső visszalépés / morzsaút */
.crm-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--crm-muted);
    font-size: 14px;
    font-weight: 700;
}
.crm-breadcrumb a {
    color: var(--crm-primary) !important;
    text-decoration: none;
}
.crm-breadcrumb a:hover {
    text-decoration: underline;
}
.crm-breadcrumb-sep {
    color: var(--crm-muted);
    opacity: .7;
}
.crm-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: var(--crm-radius);
    background: var(--crm-surface-soft);
    border: 1px solid var(--crm-border);
    color: var(--crm-text) !important;
    text-decoration: none;
    font-weight: 800;
}
.crm-back-link:hover {
    background: #fff;
}

/* Project report matrix */
.crm-report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.crm-report-tab {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--crm-border);
    background: var(--crm-surface-soft);
    color: var(--crm-text) !important;
    text-decoration: none;
    font-weight: 800;
}

.crm-report-tab.active,
.crm-report-tab:hover {
    background: var(--crm-primary);
    border-color: var(--crm-primary);
    color: #fff !important;
}

.crm-report-help {
    margin: 10px 0 16px;
    color: var(--crm-muted);
}

.crm-matrix-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    background: #fff;
    max-height: 72vh;
}

.crm-matrix-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.crm-matrix-table th,
.crm-matrix-table td {
    padding: 10px 12px;
    border-right: 1px solid var(--crm-border);
    border-bottom: 1px solid var(--crm-border);
    text-align: center;
    vertical-align: middle;
    min-width: 116px;
}

.crm-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    font-weight: 900;
}

.crm-matrix-table thead tr:nth-child(2) th {
    top: 43px;
    z-index: 3;
}

.crm-matrix-date {
    position: sticky;
    left: 0;
    z-index: 4 !important;
    min-width: 150px !important;
    text-align: left !important;
    background: #fff !important;
}

.crm-matrix-table thead .crm-matrix-date {
    background: #f8fafc !important;
    z-index: 5 !important;
}

.crm-matrix-surface {
    background: #eef2ff !important;
    color: #1e3a8a;
}

.crm-matrix-workflow {
    background: #f8fafc !important;
}

.crm-matrix-table small {
    display: block;
    margin-top: 3px;
    color: var(--crm-muted);
    font-weight: 600;
    font-size: 12px;
    line-height: 1.25;
}

.crm-weekend-row th,
.crm-weekend-row td {
    background: #f3f4f6;
}

.crm-weekend-row .crm-matrix-date {
    background: #e5e7eb !important;
}

.crm-matrix-filled {
    background: #ecfdf5;
}

.crm-matrix-filled strong {
    display: block;
    color: #166534;
    font-size: 15px;
}

.crm-matrix-empty {
    color: #cbd5e1;
}

/* V1.6 stabilizáció */
.crm-global-search {
    flex: 1;
    max-width: 420px;
}
.crm-global-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 9px 13px;
    background: #fff;
    color: var(--crm-text);
}
.crm-search-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.crm-table form {
    margin: 0;
}
.crm-btn-danger,
.crm-button.crm-btn-danger {
    background: var(--crm-danger);
    color: #fff !important;
}
.crm-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--crm-bg);
    padding: 10px 0;
}
.crm-form .crm-button[type="submit"],
.crm-actions-sticky {
    position: sticky;
    bottom: 14px;
    z-index: 15;
}
.crm-table-wrap {
    -webkit-overflow-scrolling: touch;
}
.crm-menu a,
.crm-button,
.crm-btn,
.crm-list-item {
    min-height: 44px;
}
@media (max-width: 900px) {
    .crm-topbar {
        align-items: stretch;
    }
    .crm-global-search {
        max-width: none;
        width: 100%;
    }
    .crm-search-page {
        grid-template-columns: 1fr;
    }
    .crm-table th,
    .crm-table td {
        padding: 12px 10px;
        white-space: nowrap;
    }
}


/* V1.8 UI Polish - Felület Mester grafit/narancs design system */
body:has(.crm-app) header.crm-topbar {
    display: flex !important;
}

.crm-app {
    --crm-primary: #f2a31a;
    --crm-primary-dark: #c98208;
    --crm-primary-soft: #fff3d7;
    --crm-graphite: #2f343a;
    --crm-graphite-dark: #23272c;
    --crm-graphite-soft: #434a52;
    --crm-bg: #f5f6f8;
    --crm-surface: #ffffff;
    --crm-surface-soft: #f8f8f7;
    --crm-text: #23272c;
    --crm-muted: #69707a;
    --crm-border: #e1e3e6;
    --crm-success: #2f9e44;
    --crm-warning: #f2a31a;
    --crm-danger: #c7362f;
    --crm-shadow: 0 8px 24px rgba(47, 52, 58, 0.08);
    letter-spacing: -0.01em;
}

.crm-sidebar {
    background: linear-gradient(180deg, var(--crm-graphite) 0%, var(--crm-graphite-dark) 100%);
    border-right: 1px solid rgba(255,255,255,.06);
}

.crm-logo {
    background: var(--crm-primary);
    color: var(--crm-graphite-dark);
    box-shadow: 0 10px 24px rgba(242,163,26,.24);
}

.crm-brand strong { color: #fff; }
.crm-brand span { color: rgba(255,255,255,.62); }

.crm-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.78) !important;
    border: 1px solid transparent;
}

.crm-menu a:hover,
.crm-menu a.active {
    background: rgba(242,163,26,.13);
    border-color: rgba(242,163,26,.28);
    color: #fff !important;
}

.crm-menu a.active {
    box-shadow: inset 4px 0 0 var(--crm-primary);
}

.crm-menu-icon,
.crm-card-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.crm-menu-icon svg,
.crm-card-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-menu a.active .crm-menu-icon,
.crm-menu a:hover .crm-menu-icon {
    color: var(--crm-primary);
}

.crm-main {
    background:
        radial-gradient(circle at top right, rgba(242,163,26,.10), transparent 32rem),
        var(--crm-bg);
}

.crm-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(245,246,248,.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(225,227,230,.8);
    border-radius: var(--crm-radius-lg);
    padding: 16px 18px;
    box-shadow: 0 8px 28px rgba(47,52,58,.06);
}

.crm-topbar h1 {
    font-size: 25px;
    font-weight: 900;
}

.crm-card,
.crm-stat,
.crm-module {
    border-color: rgba(225,227,230,.95);
    box-shadow: var(--crm-shadow);
}

.crm-card,
.crm-stat {
    position: relative;
}

.crm-stat::before,
.crm-card.crm-accent::before {
	content: '';
    position: absolute;
    left: 0;
    top: 0px;
    bottom: 0px;
    width: 12px;
    border-radius: 999px 0 0 999px;
    background: var(--crm-primary);
    box-shadow: 9px 0px 22px #a6a6a675;
}

.crm-stat span {
	text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 15px;
    font-weight: 900;
}

.crm-stat strong {
    color: var(--crm-graphite-dark);
}

.crm-welcome {
    background: linear-gradient(135deg, #fff 0%, #fff9ec 100%);
    border-color: rgba(242,163,26,.26);
}

.crm-section-head h2, .crm-card-title {
    font-weight: 900;
    margin-bottom: 10px;
}

.crm-button,
.crm-btn {
    box-shadow: 0 8px 18px rgba(242,163,26,.22);
}

.crm-button:hover,
.crm-btn:hover {
    transform: translateY(-1px);
}

.crm-btn-secondary {
    background: #fff;
    color: var(--crm-graphite) !important;
    border-color: var(--crm-border);
    box-shadow: none;
}

.crm-btn-secondary:hover {
    background: var(--crm-surface-soft);
    border-color: #cfd3d8;
}

.crm-btn-danger {
    background: var(--crm-danger);
    box-shadow: 0 8px 18px rgba(199,54,47,.18);
}

.crm-user-badge {
    background: var(--crm-graphite);
    color: #fff;
    border: 1px solid rgba(255,255,255,.14);
}

.crm-global-search input {
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: #fff;
    min-height: 42px;
    padding: 0 16px;
    min-width: min(340px, 45vw);
}

.crm-global-search input:focus {
    outline: none;
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px var(--crm-primary-soft);
}

.crm-table th {
    background: #f2f3f4;
    color: var(--crm-graphite-dark);
    text-transform: uppercase;
    letter-spacing: .035em;
    font-size: 12px;
}

.crm-table tbody tr:hover td {
    background: #fffaf0;
}

.crm-badge {
    background: #fff7e6;
    color: #7a4d00;
    border: 1px solid rgba(242,163,26,.28);
}

.crm-badge-success { background: #e9f8ed; color: #17692b; border-color: #bce8c7; }
.crm-badge-warning { background: #fff5dd; color: #7a4d00; border-color: #f4d28d; }
.crm-badge-danger { background: #fdebea; color: #982a24; border-color: #f2bab6; }

.crm-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    margin-right: 7px;
}

.crm-module {
    border-left: 4px solid var(--crm-primary);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.crm-module:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(47,52,58,.11);
    border-color: rgba(242,163,26,.50);
}

.crm-module strong {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.crm-module strong::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--crm-primary);
    border-radius: 5px;
    display: inline-block;
}

.crm-progress {
    height: 12px;
    background: #e5e7ea;
    border: 1px solid #d9dde2;
}

.crm-progress-bar {
    background: var(--crm-progress-color, #c7362f);
    transition: width .25s ease, background-color .25s ease;
}

.crm-progress-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--crm-muted);
}

.crm-list-item {
    background: #fff;
    border-color: rgba(225,227,230,.95);
}

.crm-list-item:hover {
    border-color: rgba(242,163,26,.45);
    box-shadow: 0 10px 22px rgba(47,52,58,.06);
}

.crm-breadcrumb a {
    color: #9b6208 !important;
}

.crm-back-link:hover {
    border-color: rgba(242,163,26,.45);
}

.crm-alert-warning {
    background: #fff5dd;
    border: 1px solid #f4d28d;
    color: #7a4d00;
}

.crm-health-good { color: var(--crm-success); }
.crm-health-watch { color: var(--crm-warning); }
.crm-health-risk { color: var(--crm-danger); }

@media (max-width: 1000px) {
    .crm-topbar {
        position: static;
    }

    .crm-global-search input {
        min-width: 100%;
        width: 100%;
    }
}


/* V1.8.2 UI polish sprint */
.entry-content {
    padding: 0 !important;
}

main {
    margin-top: 0 !important;
    padding: 0 !important;
}

.has-global-padding > .alignfull {
    margin: 0;
}

.crm-module {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    min-height: 118px;
}

.crm-module strong,
.crm-module span {
    grid-column: 2;
}

.crm-module strong::before {
    content: none !important;
}

.crm-module-icon {
    grid-row: 1 / span 2;
    grid-column: 1;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--crm-primary-soft);
    color: var(--crm-primary);
    border: 1px solid rgba(242,163,26,.30);
}

.crm-module-icon svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-module:hover .crm-module-icon {
    background: var(--crm-primary);
    color: var(--crm-graphite-dark);
    transform: translateY(-1px);
}

.crm-module-title {
    display: block;
    font-size: 17px;
    line-height: 1.2;
}

.crm-module-desc {
    display: block;
    line-height: 1.35;
}

.crm-table-wrap {
    border-radius: var(--crm-radius-lg);
    border: 1px solid var(--crm-border);
    background: #fff;
}

.crm-table th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.crm-table tbody tr {
    transition: background-color .16s ease;
}

.crm-table th:first-child,
.crm-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
}

.crm-table th:first-child {
    z-index: 3;
    background: #f2f3f4;
}

.crm-matrix-surface {
    background: #fff5dd !important;
    color: #7a4d00;
}

.crm-matrix-filled {
    background: #f0f8f2;
}

.crm-matrix-filled strong {
    color: var(--crm-success);
}

.crm-progress {
    box-shadow: inset 0 1px 2px rgba(47,52,58,.08);
}

.crm-progress-bar {
    min-width: 0;
}

.crm-badge {
    gap: 6px;
}

.crm-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: .85;
}

.crm-status-dot + .crm-badge::before,
.crm-badge:has(.crm-status-dot)::before {
    content: none;
}

@media (max-width: 700px) {
    .crm-module {
        min-height: 96px;
    }

    .crm-module-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .crm-table th:first-child,
    .crm-table td:first-child {
        position: static;
    }
}

/* Client portal MVP */
.crm-client-hero {
    border-left: 4px solid var(--crm-primary, #f2a31a);
}

.crm-client-project-card,
.crm-client-surface-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--crm-surface, #fff);
    border: 1px solid var(--crm-border, #e5e7eb);
    border-radius: var(--crm-radius-lg, 18px);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--crm-shadow, 0 10px 28px rgba(15,23,42,.07));
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.crm-client-project-card:hover {
    transform: translateY(-2px);
    border-color: var(--crm-primary, #f2a31a);
    box-shadow: 0 16px 34px rgba(15,23,42,.11);
}

.crm-client-project-card strong {
    font-size: 20px;
    line-height: 1.2;
}

.crm-client-project-card small,
.crm-client-surface-card small,
.crm-client-workflow-row small,
.crm-muted {
    color: var(--crm-muted, #64748b);
}

.crm-client-progress-row,
.crm-client-surface-head,
.crm-client-workflow-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.crm-client-main-progress {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.crm-client-main-progress > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.crm-client-main-progress strong {
    font-size: 34px;
    color: var(--crm-text, #111827);
}

.crm-client-surface-list {
    display: grid;
    gap: 16px;
}

.crm-client-workflow-list {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--crm-border, #e5e7eb);
}

.crm-client-workflow-row {
    padding: 8px 0;
    border-bottom: 1px dashed var(--crm-border, #e5e7eb);
}

.crm-client-workflow-row:last-child {
    border-bottom: 0;
}

.crm-client-workflow-row span {
    font-weight: 700;
}

.crm-client-workflow-row strong {
    color: var(--crm-primary-dark, #b66f00);
}


/* V2.0.23 — Client project detail typography/alignment */
.crm-client-surface-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.crm-client-surface-title strong {
    font-size: 19px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--crm-text, #111827);
}

.crm-client-surface-title small {
    font-size: 13px;
    white-space: nowrap;
}

.crm-client-workflow-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto) 64px;
    align-items: center;
    column-gap: 16px;
}

.crm-client-workflow-name {
    min-width: 0;
}

.crm-client-workflow-quantity {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.crm-client-workflow-progress {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .crm-client-surface-head {
        align-items: flex-start;
    }

    .crm-client-workflow-row {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 4px;
    }

    .crm-client-workflow-quantity {
        grid-column: 1 / 2;
        grid-row: 2;
        text-align: left;
    }

    .crm-client-workflow-progress {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        align-self: center;
    }
}

/* V1.9 — Charts + export polish */
.crm-chart-card {
    min-height: 300px;
}

.crm-chart-card canvas {
    width: 100%;
    max-width: 100%;
    display: block;
    background: linear-gradient(180deg, rgba(242,163,26,.035), rgba(47,52,58,.015));
    border: 1px solid rgba(47,52,58,.08);
    border-radius: var(--crm-radius, 14px);
    padding: 10px;
}

.crm-matrix-wrap {
    position: relative;
    max-height: 72vh;
}

.crm-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.crm-matrix-table thead tr:nth-child(2) th {
    top: 48px;
    z-index: 4;
}

.crm-matrix-table .crm-matrix-date {
    position: sticky;
    left: 0;
    z-index: 7;
    box-shadow: 6px 0 12px rgba(47,52,58,.06);
}

.crm-matrix-table thead .crm-matrix-date {
    z-index: 9;
}

.crm-report-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--crm-muted, #64748b);
}

.crm-report-tabs {
    padding-bottom: 4px;
}

@media (max-width: 760px) {
    .crm-chart-card {
        min-height: 260px;
    }
    .crm-matrix-wrap {
        max-height: 70vh;
    }
    .crm-matrix-table thead tr:nth-child(2) th {
        top: 42px;
    }
}

/* V1.9.1 - Advanced chart view */
.crm-chart-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.crm-chart-card-head h3 {
    margin: 0;
}

.crm-chart-full-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(242, 163, 26, .42);
    border-radius: 999px;
    color: var(--crm-primary) !important;
    background: rgba(242, 163, 26, .08);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.crm-chart-full-link:hover {
    background: var(--crm-primary);
    color: #2f343a !important;
}

.crm-chart-filter {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin: 18px 0;
    background: rgba(47, 52, 58, .035);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
}

.crm-chart-presets,
.crm-chart-dates,
.crm-chart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.crm-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    background: #fff;
    color: var(--crm-graphite) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.crm-chip:hover,
.crm-chip.active {
    border-color: var(--crm-primary);
    background: rgba(242, 163, 26, .12);
    color: #2f343a !important;
}

.crm-chart-dates label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--crm-muted);
}

.crm-chart-dates input[type="date"] {
    min-height: 42px;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    padding: 8px 12px;
    background: #fff;
    color: var(--crm-text);
}

.crm-chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    border-radius: var(--crm-radius-lg);
}

.crm-chart-full .crm-chart-scroll {
    border: 1px solid var(--crm-border);
    background: #fff;
    padding: 18px 18px 10px;
}

.ecrm-chart-large {
    display: block;
    max-width: none;
}

.crm-chart-meta {
    margin-top: 14px;
    color: var(--crm-muted);
    font-size: 13px;
}

.crm-chart-meta strong {
    color: var(--crm-text);
}

@media (max-width: 700px) {
    .crm-chart-card-head,
    .crm-chart-card .crm-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .crm-chart-dates {
        align-items: stretch;
    }

    .crm-chart-dates label,
    .crm-chart-dates .crm-button {
        width: 100%;
    }
}

/* V2.0.1: compact optional material usage block */
.crm-compact-details {
    border: 1px solid rgba(47,52,58,.12);
    border-radius: 14px;
    background: rgba(255,255,255,.7);
    margin: 12px 0;
    overflow: hidden;
}
.crm-compact-details > summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--crm-graphite);
}
.crm-compact-details > summary::-webkit-details-marker { display: none; }
.crm-compact-details > summary span {
    font-size: 12px;
    font-weight: 600;
    opacity: .65;
    margin-left: 8px;
}
.ecrm-material-wrap { margin: 0 12px 12px; padding: 12px; }
.ecrm-material-row { align-items: end; margin-bottom: 10px; }
.crm-grid-5 { grid-template-columns: 1.5fr .8fr .7fr .9fr 1.2fr; }
.crm-muted { color: rgba(47,52,58,.68); margin-top: 0; }
@media (max-width: 900px) { .crm-grid-5 { grid-template-columns: 1fr; } }

/* Operating costs polish */
.crm-operating-costs-page .crm-year-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px 16px;
    background: var(--crm-surface-soft);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
}

.crm-year-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.crm-year-filter label {
    margin-right: 4px;
    font-weight: 900;
    color: var(--crm-text);
}

.crm-year-filter select {
    min-width: 130px;
    min-height: 44px;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    padding: 0 42px 0 16px;
    background: #fff;
    color: var(--crm-text);
    font-size: var(--crm-field-font-size, 15px);
    font-weight: 800;
}

.crm-year-filter select:focus {
    outline: none;
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px var(--crm-primary-soft);
}

.crm-form-panel {
    display: grid;
    gap: 18px;
    padding: 18px;
    background: var(--crm-surface-soft);
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
}

.crm-nice-form .crm-field > span {
    display: block;
    margin-bottom: 7px;
    font-weight: 900;
    color: var(--crm-text);
}

.crm-nice-form .crm-field input,
.crm-nice-form .crm-field select,
.crm-nice-form .crm-field textarea {
    width: 100%;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    background: #fff;
}

.crm-nice-form .crm-field textarea {
    min-height: 96px;
}

.crm-input-suffix {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    overflow: hidden;
}

.crm-input-suffix:focus-within {
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 3px var(--crm-primary-soft);
}

.crm-input-suffix input {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.crm-input-suffix em {
    padding: 0 14px;
    color: var(--crm-muted);
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.crm-form-actions {
    justify-content: flex-start;
}

@media (max-width: 760px) {
    .crm-operating-costs-page .crm-year-toolbar,
    .crm-year-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-year-filter select,
    .crm-year-filter .crm-btn {
        width: 100%;
    }
}


.crm-filter-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-top: 18px;
}
.crm-filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--crm-muted, #64748b);
}
.crm-filter-bar input,
.crm-filter-bar select {
    width: 100%;
}
@media (max-width: 1000px) {
    .crm-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .crm-filter-bar { grid-template-columns: 1fr; }
}

/* Team performance filter toolbar */
.crm-team-performance-page .crm-team-filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1.2fr) minmax(150px, .9fr) minmax(150px, .9fr) auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    margin-top: 18px;
    background: var(--crm-surface-soft, #f8fafc);
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius-lg, 18px);
}

.crm-team-performance-page .crm-team-filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    min-width: 0;
}

.crm-team-performance-page .crm-team-filter-bar label > span {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .02em;
    color: var(--crm-muted, #64748b);
}

.crm-team-performance-page .crm-team-filter-bar select,
.crm-team-performance-page .crm-team-filter-bar input[type="date"] {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius, 14px);
    background-color: #fff;
    color: var(--crm-text, #0f172a);
    font-size: var(--crm-field-font-size, 15px);
    font-weight: 700;
    box-shadow: none;
}

.crm-team-performance-page .crm-team-filter-bar select {
    padding-right: 38px;
}

.crm-team-performance-page .crm-team-filter-bar select:focus,
.crm-team-performance-page .crm-team-filter-bar input[type="date"]:focus {
    outline: none;
    border-color: var(--crm-primary, #2563eb);
    box-shadow: 0 0 0 3px var(--crm-primary-soft, rgba(37, 99, 235, .12));
}

.crm-team-performance-page .crm-team-filter-submit {
    min-height: 46px;
    padding-left: 22px;
    padding-right: 22px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .crm-team-performance-page .crm-team-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crm-team-performance-page .crm-team-filter-submit {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .crm-team-performance-page .crm-team-filter-bar {
        grid-template-columns: 1fr;
        padding: 14px;
    }
}

/* Team performance page spacing */
.crm-team-performance-page {
    margin-bottom: 18px;
}

.crm-team-performance-page + .crm-grid {
    margin-top: 18px;
    margin-bottom: 18px;
}

.crm-team-performance-page + .crm-grid + .crm-card,
.crm-team-performance-page + .crm-grid + .crm-card + .crm-card {
    margin-top: 18px;
}

@media (max-width: 640px) {
    .crm-team-performance-page,
    .crm-team-performance-page + .crm-grid,
    .crm-team-performance-page + .crm-grid + .crm-card,
    .crm-team-performance-page + .crm-grid + .crm-card + .crm-card {
        margin-bottom: 14px;
        margin-top: 14px;
    }
}


/* Notification settings */
.crm-notification-settings { padding: 0; overflow: hidden; }
.crm-notification-table th,
.crm-notification-table td { vertical-align: middle; }
.crm-notification-table th:not(:first-child),
.crm-notification-table td:not(:first-child) { text-align: center; width: 130px; }
.crm-switch { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.crm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.crm-switch span { width: 46px; height: 26px; border-radius: 999px; background: rgba(15, 23, 42, .16); position: relative; display: inline-block; transition: .18s ease; }
.crm-switch span:before { content: ''; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .22); transition: .18s ease; }
.crm-switch input:checked + span { background: var(--crm-primary, #2563eb); }
.crm-switch input:checked + span:before { transform: translateX(20px); }
@media (max-width: 760px) {
    .crm-notification-table th:not(:first-child),
    .crm-notification-table td:not(:first-child) { width: auto; min-width: 92px; }
}

/* Settings overview */
.crm-settings-grid { align-items: stretch; }
.crm-settings-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.crm-settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .10);
    border-color: rgba(37, 99, 235, .22);
}
.crm-settings-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .08);
    margin-bottom: 14px;
    font-size: 20px;
}
.crm-settings-card h3 { margin: 0 0 6px; }
.crm-settings-card p { margin: 0; color: var(--crm-muted); line-height: 1.45; }

/* Settings overview aligned with project detail module cards */
.crm-settings-grid,
.crm-settings-card,
.crm-settings-card-icon { all: unset; }

/* V2.0.10 - compact navigation polish */
.crm-layout {
    transition: grid-template-columns .22s ease;
}

.crm-brand {
    justify-content: space-between;
    gap: 10px;
}

.crm-brand-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.crm-brand-text {
    min-width: 0;
}

.crm-nav-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: .18s ease;
    flex: 0 0 auto;
}

.crm-nav-toggle:hover {
    background: rgba(242,163,26,.18);
    border-color: rgba(242,163,26,.35);
}

.crm-nav-toggle-line {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    display: block;
}

@media (min-width: 1001px) {
    .crm-app.crm-sidebar-collapsed .crm-layout {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .crm-app.crm-sidebar-collapsed .crm-sidebar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .crm-app.crm-sidebar-collapsed .crm-brand {
        justify-content: center;
        margin-bottom: 22px;
    }

    .crm-app.crm-sidebar-collapsed .crm-brand-main {
        display: none;
    }

    .crm-app.crm-sidebar-collapsed .crm-nav-toggle {
        transform: rotate(180deg);
    }

    .crm-app.crm-sidebar-collapsed .crm-menu {
        gap: 10px;
    }

    .crm-app.crm-sidebar-collapsed .crm-menu a {
        width: 52px;
        height: 52px;
        min-height: 52px;
        padding: 0;
        justify-content: center;
        font-size: 0;
        gap: 0;
        margin: 0 auto;
        position: relative;
    }

    .crm-app.crm-sidebar-collapsed .crm-menu a .crm-menu-icon {
        width: 21px;
        height: 21px;
    }

    .crm-app.crm-sidebar-collapsed .crm-menu a .crm-menu-icon svg {
        width: 21px;
        height: 21px;
    }

    .crm-app.crm-sidebar-collapsed .crm-menu a.active {
        box-shadow: inset 0 -4px 0 var(--crm-primary);
    }
}

@media (max-width: 1000px) {
    .crm-layout {
        display: block;
        min-height: 0;
    }

    .crm-sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 10px 12px !important;
        border-right: 0;
        box-shadow: 0 8px 22px rgba(47,52,58,.16);
    }

    .crm-brand {
        margin-bottom: 0;
    }

    .crm-logo {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 13px;
    }

    .crm-brand-main {
        gap: 10px;
    }

    .crm-brand strong {
        font-size: 15px;
        line-height: 1.1;
    }

    .crm-brand span {
        font-size: 11px;
        line-height: 1.15;
    }

    .crm-nav-toggle {
        width: 40px;
        height: 40px;
    }

    .crm-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        margin-top: 0;
        transition: max-height .22s ease, opacity .18s ease, margin-top .18s ease;
    }

    .crm-app.crm-mobile-menu-open .crm-menu {
        max-height: 72vh;
        overflow-y: auto;
        opacity: 1;
        margin-top: 12px;
        padding-bottom: 2px;
    }

    .crm-menu a {
        min-height: 42px;
        padding: 10px 11px;
        font-size: 14px;
        border-radius: 12px;
    }

    .crm-main {
        padding-top: 14px !important;
    }

    .crm-topbar {
        position: static;
        margin-bottom: 14px;
        padding: 13px 14px;
        border-radius: 16px;
        gap: 12px;
    }

    .crm-topbar h1 {
        font-size: 21px;
    }

    .crm-topbar p {
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .crm-menu {
        grid-template-columns: 1fr;
    }

    .crm-brand-text span {
        display: none;
    }

    .crm-brand strong {
        font-size: 14px;
    }
}

/* Admin-only custom project/worker color markers */
.crm-colored-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
}

.crm-colored-title > div {
	min-width: 0;
    font-weight: 500;
    font-size: 16px;
}

.crm-project-title-link strong {
    transition: color .16s ease;
}

.crm-project-title-link:hover strong {
    color: var(--crm-primary);
}

.crm-project-title-link:hover small {
    color: var(--crm-text);
}

.crm-color-dot {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 999px;
    background: var(--crm-item-color, var(--crm-primary));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-item-color, var(--crm-primary)) 18%, transparent);
}

.crm-title-with-color .crm-color-dot {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
}

.crm-row-has-color {
    border-left: 4px solid var(--crm-item-color, var(--crm-primary));
}

.crm-color-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.crm-color-input-row input[type="color"] {
    width: 58px;
    min-height: 42px;
    height: 42px;
    padding: 4px;
    border-radius: 12px;
    cursor: pointer;
}

.crm-color-input-row span {
    color: var(--crm-muted);
    font-size: 13px;
}

@media (max-width: 640px) {
    .crm-color-input-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.crm-check-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    margin: 0;
}

.crm-check-inline input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

/* V2.0.13 permission editor clarity */
.crm-permission-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.crm-permission-editor-head p {
    margin: 6px 0 0;
    color: var(--crm-muted);
}
.crm-editing-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--crm-primary-soft);
    color: var(--crm-primary-dark);
    font-weight: 900;
    white-space: nowrap;
}
.crm-role-switcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}
.crm-role-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    background: var(--crm-surface);
    color: var(--crm-text) !important;
    text-decoration: none;
    font-weight: 900;
}
.crm-role-pill small {
    color: var(--crm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.crm-role-pill.is-active {
    border-color: var(--crm-primary);
    background: var(--crm-primary-soft);
    box-shadow: inset 4px 0 0 var(--crm-primary);
}
.crm-permission-warning {
    margin: 0 0 16px;
}
@media (max-width: 760px) {
    .crm-permission-editor-head {
        flex-direction: column;
    }
    .crm-editing-badge {
        white-space: normal;
    }
}

/* Reports view selector */
.crm-reports-page .crm-report-view-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin: 18px 0;
    background: var(--crm-surface-soft, #f8fafc);
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius-lg, 18px);
}
.crm-reports-page .crm-report-view-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    min-width: 0;
}
.crm-reports-page .crm-report-view-toolbar label > span {
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .02em;
    color: var(--crm-muted, #64748b);
}
.crm-reports-page .crm-report-view-toolbar select {
    width: 100%;
    min-height: 46px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius, 14px);
    background-color: #fff;
    color: var(--crm-text, #0f172a);
    font-size: var(--crm-field-font-size, 15px);
    font-weight: 700;
    box-shadow: none;
}
.crm-reports-page .crm-report-view-toolbar select:focus {
    outline: none;
    border-color: var(--crm-primary, #2563eb);
    box-shadow: 0 0 0 3px var(--crm-primary-soft, rgba(37, 99, 235, .12));
}
.crm-reports-page .crm-report-view-toolbar .crm-btn,
.crm-reports-page .crm-report-view-toolbar .crm-btn-secondary {
    min-height: 46px;
    white-space: nowrap;
}
.crm-report-context {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 13px;
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius, 14px);
    background: #fff;
}
.crm-report-context span {
    color: var(--crm-muted, #64748b);
    font-weight: 800;
    font-size: 12px;
}
.crm-report-context strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--crm-text, #0f172a);
}
@media (max-width: 900px) {
    .crm-reports-page .crm-report-view-toolbar {
        grid-template-columns: 1fr;
    }
    .crm-reports-page .crm-report-view-toolbar .crm-btn,
    .crm-reports-page .crm-report-view-toolbar .crm-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* V2.0.16: admin-only color markers on dashboard overview lists */
.crm-list-item-has-color {
    border-left: 4px solid var(--crm-item-color, var(--crm-primary));
}
.crm-list-item .crm-colored-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.crm-list-item small.crm-colored-title {
    margin-top: 3px;
}

.crm-table-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.crm-inline-form{display:inline-flex;margin:0}.crm-danger-zone{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.crm-danger-zone p{margin:0;color:var(--crm-muted);font-size:13px;flex:1 1 320px}

/* v2.0.18 – egységes műveleti gombok */
.crm-app {
    --crm-save-bg: #dff5e7;
    --crm-save-bg-hover: #c9ecd6;
    --crm-save-text: #166534;
    --crm-save-border: #a7dfba;
    --crm-delete-bg: #fde2e2;
    --crm-delete-bg-hover: #f9cccc;
    --crm-delete-text: #991b1b;
    --crm-delete-border: #f1aaaa;
    --crm-edit-bg: var(--crm-graphite, #1f2937);
    --crm-edit-bg-hover: #111827;
}
.crm-btn-save,
.crm-button.crm-btn-save {
    background: var(--crm-save-bg) !important;
    color: var(--crm-save-text) !important;
    border: 1px solid var(--crm-save-border) !important;
    box-shadow: 0 8px 18px rgba(22, 101, 52, .10) !important;
}
.crm-btn-save:hover,
.crm-button.crm-btn-save:hover {
    background: var(--crm-save-bg-hover) !important;
    color: var(--crm-save-text) !important;
}
.crm-btn-edit,
.crm-button.crm-btn-edit {
    background: var(--crm-edit-bg) !important;
    color: #fff !important;
    border: 1px solid rgba(15, 23, 42, .16) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14) !important;
}
.crm-btn-edit:hover,
.crm-button.crm-btn-edit:hover {
    background: var(--crm-edit-bg-hover) !important;
    color: #fff !important;
}
.crm-btn-danger,
.crm-button.crm-btn-danger {
    background: var(--crm-delete-bg) !important;
    color: var(--crm-delete-text) !important;
    border: 1px solid var(--crm-delete-border) !important;
    box-shadow: 0 8px 18px rgba(153, 27, 27, .10) !important;
}
.crm-btn-danger:hover,
.crm-button.crm-btn-danger:hover {
    background: var(--crm-delete-bg-hover) !important;
    color: var(--crm-delete-text) !important;
}


/* v2.0.22 – ügyfél dashboard finomítás */
.crm-client-project-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.crm-client-project-list .crm-client-project-card {
    width: 100%;
}

.crm-client-alerts .crm-list-item.crm-alert-warning {
    margin: 0;
    border-left: 4px solid #f59e0b;
}


/* Client project extra works table alignment */
.crm-client-extra-table th,
.crm-client-extra-table td {
    vertical-align: middle;
}

.crm-client-extra-table td:first-child strong {
    display: block;
    margin-bottom: 4px;
}

.crm-client-extra-table td:first-child small {
    display: block;
    color: var(--crm-muted);
    line-height: 1.4;
}

.crm-client-extra-actions {
    min-width: 220px;
    align-items: center;
    gap: 8px;
}

.crm-client-extra-actions .crm-inline-form {
    margin: 0;
}

.crm-client-extra-actions .crm-btn {
    min-height: 38px;
    padding-left: 14px;
    padding-right: 14px;
    white-space: nowrap;
}

.crm-action-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px dashed var(--crm-border);
    border-radius: var(--crm-radius-sm, 10px);
    background: var(--crm-surface-soft);
    white-space: nowrap;
}

@media (max-width: 760px) {
    .crm-client-extra-actions {
        min-width: 0;
        justify-content: flex-start;
    }

    .crm-client-extra-actions .crm-btn,
    .crm-action-placeholder {
        min-height: 36px;
    }
}


/* Client extra work decision column: keep table cells as table-cells, align inner actions only */
.crm-client-extra-table .crm-client-extra-actions-cell {
    vertical-align: middle;
    min-width: 230px;
}

.crm-client-extra-table .crm-client-extra-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 38px;
    line-height: 1;
}

.crm-client-extra-table .crm-client-extra-actions .crm-inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.crm-client-extra-table .crm-client-extra-actions .crm-btn,
.crm-client-extra-table .crm-client-extra-actions .crm-action-placeholder {
    margin: 0;
    vertical-align: middle;
}

/* v2.0.26 – Client extra works table without horizontal scroll */
.crm-client-extra-table-wrap {
    overflow-x: hidden;
}

.crm-client-extra-table {
    table-layout: fixed;
    width: 100%;
}

.crm-client-extra-table th,
.crm-client-extra-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.crm-client-extra-table th:nth-child(1),
.crm-client-extra-table td:nth-child(1) { width: 34%; }
.crm-client-extra-table th:nth-child(2),
.crm-client-extra-table td:nth-child(2) { width: 14%; }
.crm-client-extra-table th:nth-child(3),
.crm-client-extra-table td:nth-child(3) { width: 15%; }
.crm-client-extra-table th:nth-child(4),
.crm-client-extra-table td:nth-child(4) { width: 16%; }
.crm-client-extra-table th:nth-child(5),
.crm-client-extra-table td:nth-child(5) { width: 21%; }

.crm-client-extra-table .crm-client-extra-actions-cell {
    min-width: 0;
}

.crm-client-extra-table .crm-client-extra-actions {
    max-width: 100%;
}

.crm-client-extra-table .crm-client-extra-actions .crm-btn,
.crm-client-extra-table .crm-client-extra-actions .crm-action-placeholder {
    max-width: 100%;
}

@media (max-width: 760px) {
    .crm-client-extra-table-wrap {
        border: 0;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .crm-client-extra-table,
    .crm-client-extra-table thead,
    .crm-client-extra-table tbody,
    .crm-client-extra-table tr,
    .crm-client-extra-table th,
    .crm-client-extra-table td {
        display: block;
        width: 100% !important;
    }

    .crm-client-extra-table thead {
        display: none;
    }

    .crm-client-extra-table {
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
        overflow: visible;
    }

    .crm-client-extra-table tbody tr {
        margin-bottom: 14px;
        border: 1px solid var(--crm-border);
        border-radius: var(--crm-radius-lg);
        background: #fff;
        overflow: hidden;
    }

    .crm-client-extra-table td,
    .crm-client-extra-table td:first-child {
        position: static;
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 12px 14px;
        border-bottom: 1px solid var(--crm-border);
        white-space: normal;
        background: #fff;
    }

    .crm-client-extra-table td:last-child {
        border-bottom: 0;
    }

    .crm-client-extra-table td::before {
        content: attr(data-label);
        color: var(--crm-muted);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .03em;
        line-height: 1.25;
    }

    .crm-client-extra-table td:first-child strong,
    .crm-client-extra-table td:first-child small {
        min-width: 0;
    }

    .crm-client-extra-table .crm-client-extra-actions {
        justify-content: flex-start;
        gap: 8px;
    }
}

@media (max-width: 440px) {
    .crm-client-extra-table td,
    .crm-client-extra-table td:first-child {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}


/* V2.0.27: global logout button in fixed topbar */
.crm-topbar-user-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
}

.crm-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--crm-graphite, #2f343a);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 900;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 8px 18px rgba(47,52,58,.12);
    white-space: nowrap;
    transition: .18s ease;
}

.crm-logout-btn:hover {
    background: var(--crm-graphite-dark, #23272c);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .crm-topbar {
        align-items: stretch;
    }
    .crm-topbar-user-actions {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
    .crm-topbar-user-actions .crm-user-badge,
    .crm-topbar-user-actions .crm-logout-btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 560px) {
    .crm-topbar-user-actions {
        gap: 8px;
    }
    .crm-topbar-user-actions .crm-user-badge,
    .crm-topbar-user-actions .crm-logout-btn {
        min-height: 38px;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 13px;
    }
}

/* v2.0.29 - FM-CRM branding logo */
.crm-logo-img {
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.crm-logo-img-sidebar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.crm-logo-img-login {
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(0,0,0,.16);
}

.crm-app.crm-sidebar-collapsed .crm-logo-img-sidebar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

@media (max-width: 760px) {
    .crm-logo-img-sidebar {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .crm-logo-img-login {
        width: 82px;
        height: 82px;
        border-radius: 20px;
    }
}

/* v2.0.30 – CRM login design */
body:has(.crm-login) {
    background: #0f172a !important;
}

body:has(.crm-login) header,
body:has(.crm-login) footer,
body:has(.crm-login) main > h1,
body:has(.crm-login) .entry-title {
    display: none !important;
}

.crm-login {
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, .16), transparent 34%), #0f172a !important;
    color: #0f172a;
}

.crm-login-card,
.crm-login .crm-card {
    width: min(100%, 430px);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .32);
    padding: 30px;
}

.crm-login-card {
    text-align: left;
}

.crm-login-card .crm-logo-img-login {
    display: block;
    width: 86px;
    height: 86px;
    object-fit: contain;
    border-radius: 22px;
    margin: 0 auto 18px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .16);
}

.crm-login-card h1 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 30px;
    line-height: 1.1;
    color: #0f172a;
}

.crm-login-card > p {
    margin: 0 0 22px;
    text-align: center;
    color: #64748b;
    font-weight: 700;
}

.crm-login-card .crm-form {
    gap: 16px;
}

.crm-login-card .crm-field {
    gap: 8px;
}

.crm-login-card .crm-field label {
    color: #334155;
    font-weight: 800;
    font-size: 14px;
}

.crm-login-card .crm-field input {
    min-height: 50px;
    border-radius: 999px;
    border: 1px solid #d7dde7;
    background: #f8fafc;
    padding: 12px 18px;
    color: #0f172a;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.crm-login-card .crm-field input:focus {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}

.crm-login-card .crm-check {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.crm-login-card .crm-button,
.crm-login-card button.crm-button,
.crm-login-card .crm-form .crm-button[type="submit"] {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #d97706 !important;
    background: #f59e0b !important;
    color: #111827 !important;
    font-weight: 900;
    box-shadow: 0 14px 26px rgba(245, 158, 11, .28) !important;
}

.crm-login-card .crm-button:hover,
.crm-login-card button.crm-button:hover,
.crm-login-card .crm-form .crm-button[type="submit"]:hover {
    background: #fbbf24 !important;
    color: #111827 !important;
    transform: translateY(-1px);
}

.crm-login-card .crm-alert {
    border-radius: 18px;
    margin-bottom: 16px;
}

@media (max-width: 560px) {
    .crm-login {
        padding: 18px 12px;
    }

    .crm-login-card,
    .crm-login .crm-card {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .crm-login-card .crm-logo-img-login {
        width: 76px;
        height: 76px;
    }
}

/* v2.0.31 – Login responsive/design fix */
body:has(.crm-login) {
    background: linear-gradient(180deg, #2f343a 0%, #23272c 100%) !important;
    margin: 0;
}

.crm-login,
.crm-login * {
    box-sizing: border-box;
}

.crm-login {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: clamp(18px, 4vw, 36px);
    background:
        radial-gradient(circle at 18% 0%, rgba(242, 163, 26, .16), transparent 34%),
        linear-gradient(180deg, #2f343a 0%, #23272c 100%) !important;
}

.crm-login-card,
.crm-login .crm-card {
    width: min(430px, 100%);
    max-width: calc(100vw - 32px);
    padding: clamp(22px, 5vw, 30px);
    overflow: hidden;
}

.crm-login-card .crm-form,
.crm-login-card .crm-field {
    width: 100%;
    max-width: 100%;
}

.crm-login-card .crm-field input,
.crm-login-card input[type="text"],
.crm-login-card input[type="password"],
.crm-login-card input[type="email"] {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.crm-login-card .crm-button,
.crm-login-card button.crm-button,
.crm-login-card .crm-form .crm-button[type="submit"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 420px) {
    .crm-login {
        padding: 14px;
        align-items: center;
    }

    .crm-login-card,
    .crm-login .crm-card {
        max-width: calc(100vw - 28px);
        border-radius: 22px;
        padding: 22px 16px;
    }

    .crm-login-card h1 {
        font-size: 25px;
    }

    .crm-login-card .crm-field input {
        min-height: 48px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* V2.0.32: daily work picker split layout */
.crm-daily-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
    margin-bottom: 16px;
}
.crm-daily-picker .crm-field {
    min-width: 0;
}
@media (max-width: 820px) {
    .crm-daily-picker {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}


/* V2.0.33: mobile overflow guard + CRM-only admin-bar cleanup support */
html:has(.crm-app),
body:has(.crm-app),
html:has(.crm-login),
body:has(.crm-login) {
    max-width: 100%;
    overflow-x: hidden !important;
}

.crm-app,
.crm-layout,
.crm-main,
.crm-content,
.crm-card,
.crm-login {
    max-width: 100%;
    overflow-x: clip;
}

.crm-main {
    min-width: 0;
    padding-bottom: 50px !important;
}

.crm-app img,
.crm-app table,
.crm-app input,
.crm-app select,
.crm-app textarea,
.crm-app button {
    max-width: 100%;
}

@supports not (overflow: clip) {
    .crm-app,
    .crm-layout,
    .crm-main,
    .crm-content,
    .crm-card,
    .crm-login {
        overflow-x: hidden;
    }
}

/* v2.0.34 – Responsive project surface/workflow tables */
.crm-responsive-card-table .crm-responsive-actions {
    white-space: nowrap;
}
.crm-responsive-card-table .crm-responsive-actions .crm-inline-form {
    margin-left: 6px;
}

@media (max-width: 760px) {
    .crm-responsive-card-table,
    .crm-responsive-card-table thead,
    .crm-responsive-card-table tbody,
    .crm-responsive-card-table tr,
    .crm-responsive-card-table th,
    .crm-responsive-card-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .crm-responsive-card-table {
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .crm-responsive-card-table thead {
        display: none;
    }

    .crm-responsive-card-table tbody tr {
        margin: 0 0 12px;
        padding: 12px;
        border: 1px solid var(--crm-border);
        border-radius: var(--crm-radius-lg);
        background: #fff;
        box-shadow: var(--crm-shadow-soft);
    }

    .crm-responsive-card-table th:first-child,
    .crm-responsive-card-table td:first-child,
    .crm-responsive-card-table th,
    .crm-responsive-card-table td {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        background: transparent !important;
    }

    .crm-responsive-card-table td {
        display: grid;
        grid-template-columns: minmax(105px, 36%) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 9px 0;
        border-bottom: 1px solid var(--crm-border);
        text-align: right;
        min-width: 0;
    }

    .crm-responsive-card-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .crm-responsive-card-table td::before {
        content: attr(data-label);
        color: var(--crm-muted);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .04em;
        text-align: left;
    }

    .crm-responsive-card-table td > * {
        min-width: 0;
        justify-self: end;
    }

    .crm-responsive-card-table td:first-child {
        grid-template-columns: 1fr;
        text-align: left;
        padding-top: 0;
    }

    .crm-responsive-card-table td:first-child::before {
        display: none;
    }

    .crm-responsive-card-table td:first-child > * {
        justify-self: start;
    }

    .crm-responsive-card-table .crm-progress {
        width: 100%;
        min-width: 120px;
        max-width: 220px;
    }

    .crm-responsive-card-table .crm-responsive-actions {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
        white-space: normal;
    }

    .crm-responsive-card-table .crm-responsive-actions::before {
        flex: 0 0 105px;
    }

    .crm-responsive-card-table .crm-responsive-actions .crm-inline-form {
        margin-left: 0;
    }
}

@media (max-width: 420px) {
    .crm-responsive-card-table td {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 5px;
    }

    .crm-responsive-card-table td > *,
    .crm-responsive-card-table td:first-child > * {
        justify-self: stretch;
    }

    .crm-responsive-card-table .crm-responsive-actions {
        justify-content: stretch;
    }

    .crm-responsive-card-table .crm-btn,
    .crm-responsive-card-table .crm-button,
    .crm-responsive-card-table .crm-inline-form,
    .crm-responsive-card-table .crm-inline-form button {
        width: 100%;
    }
}

/* v2.0.39 – Teljesítményjelentés mobil nézet */
@media (max-width: 760px) {
    .crm-performance-report-table td:first-child {
        padding-bottom: 10px;
    }

    .crm-performance-report-table td:first-child .crm-colored-title {
        width: 100%;
    }

    .crm-performance-report-table td:not(:first-child) {
        word-break: normal;
    }
}


/* v2.0.40 – Napi munka táblázat mobil reszponzív finomítás */
@media (max-width: 760px) {
    .crm-daily-logs-table td:first-child {
        grid-template-columns: minmax(105px, 36%) minmax(0, 1fr);
        text-align: right;
        padding-top: 9px;
    }

    .crm-daily-logs-table td:first-child::before {
        display: block;
    }

    .crm-daily-logs-table td:first-child > * {
        justify-self: end;
    }

    .crm-daily-logs-table .crm-colored-title {
        justify-content: flex-end;
        text-align: right;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    .crm-daily-logs-table td:first-child {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .crm-daily-logs-table td:first-child > *,
    .crm-daily-logs-table .crm-colored-title {
        justify-self: stretch;
        justify-content: flex-start;
        text-align: left;
    }
}

/* v2.0.41 - Daily work calendar filter */
.crm-daily-log-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin: 16px 0 18px;
}
.crm-field-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}
.crm-field-inline span {
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-muted, #667085);
}
.crm-field-inline input[type="date"] {
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 640px) {
    .crm-daily-log-filter,
    .crm-daily-log-filter .crm-button,
    .crm-daily-log-filter .crm-field-inline {
        width: 100%;
    }
}


/* v2.0.42 - Egységes napi munka dátumszűrő */
.crm-daily-log-filter {
    background: var(--crm-surface-soft, #f8fafc);
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius-lg, 22px);
    padding: 14px;
    align-items: end;
}
.crm-daily-log-filter .crm-field-inline span {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--crm-text, #0f172a);
}
.crm-daily-log-filter input[type="date"] {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius, 14px);
    background: #fff;
    color: var(--crm-text, #0f172a);
    font-size: var(--crm-field-font-size, 15px);
    font-weight: 700;
    line-height: 44px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
    appearance: auto;
    -webkit-appearance: auto;
}
.crm-daily-log-filter input[type="date"]:focus {
    outline: none;
    border-color: var(--crm-graphite, #1f2937);
    box-shadow: 0 0 0 3px rgba(31, 41, 55, .10);
}
.crm-daily-log-filter .crm-button,
.crm-daily-log-filter .crm-btn {
    min-height: 44px;
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
}
.crm-current-week-btn,
.crm-button.crm-current-week-btn {
    background: var(--crm-graphite, #1f2937) !important;
    color: #fff !important;
    border: 1px solid rgba(15, 23, 42, .18) !important;
}
.crm-current-week-btn:hover,
.crm-button.crm-current-week-btn:hover {
    background: #111827 !important;
}
@media (max-width: 640px) {
    .crm-daily-log-filter {
        padding: 12px;
        gap: 10px;
    }
    .crm-daily-log-filter .crm-button,
    .crm-daily-log-filter .crm-btn,
    .crm-daily-log-filter input[type="date"] {
        width: 100%;
    }
}

/* v2.0.43 - Időszak alapú költségrögzítés */
.ecrm-cost-period-panel {
    background: var(--crm-surface-soft, #f8fafc);
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius-lg, 22px);
}
.ecrm-cost-period-panel small {
    display: block;
    margin-top: 6px;
    color: var(--crm-muted, #667085);
    font-weight: 600;
    line-height: 1.35;
}
.ecrm-cost-period-panel input[type="date"],
.ecrm-cost-period-panel input[type="week"],
.ecrm-cost-period-panel input[type="month"],
.ecrm-cost-period-panel select {
    min-height: 44px;
}
.crm-cost-period-label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--crm-muted, #667085);
}

/* v2.0.45 project access relations */
.crm-access-panel { margin-top: 18px; }
.crm-check-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(17,24,39,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
}
.crm-check-list label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(248,250,252,.9);
    color: var(--crm-text, #111827);
    font-size: 14px;
    line-height: 1.35;
}
.crm-check-list input[type="checkbox"] { margin-top: 2px; }
@media (max-width: 720px) {
    .crm-check-list { max-height: 220px; }
}

/* v2.0.46 project access UI polish */
.crm-access-panel {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .05);
}
.crm-access-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(17, 24, 39, .08);
}
.crm-access-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--crm-text, #111827);
}
.crm-access-head p {
    margin: 5px 0 0;
    color: var(--crm-muted, #667085);
    font-size: 13px;
    line-height: 1.45;
}
.crm-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.crm-access-group {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 16px;
    background: #f8fafc;
}
.crm-access-group-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--crm-text, #111827);
    letter-spacing: .01em;
}
.crm-access-group > small {
    display: block;
    margin-top: 10px;
    color: var(--crm-muted, #667085);
    font-size: 12px;
    line-height: 1.4;
}
.crm-access-panel .crm-check-list {
    gap: 6px;
    max-height: 250px;
    padding: 8px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    background: #fff;
}
.crm-access-panel .crm-check-list label {
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    font-weight: 650;
}
.crm-access-panel .crm-check-list label:hover {
    border-color: rgba(17, 24, 39, .08);
    background: rgba(17, 24, 39, .035);
}
.crm-access-panel .crm-check-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--crm-graphite, #2f343b);
}
.crm-access-panel .crm-check-list span {
    min-width: 0;
    overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
    .crm-access-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .crm-access-panel { padding: 14px; border-radius: 16px; }
    .crm-access-head { margin-bottom: 12px; padding-bottom: 12px; }
    .crm-access-group { padding: 12px; }
    .crm-access-panel .crm-check-list { max-height: 220px; }
}

/* V2.0.47 - Mobile-first daily work builder */
.ecrm-daily-builder-card {
    max-width: 1180px;
}
.ecrm-daily-project-field {
    background: var(--crm-surface-soft);
    border: 1px solid var(--crm-border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
}
.ecrm-daily-meta-grid {
    margin-bottom: 16px;
}
.ecrm-work-entry-list {
    display: grid;
    gap: 16px;
    margin: 16px 0;
}
.ecrm-work-entry-card {
    background: #f4f2ee;
    border: 1px solid #ded8ce;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(47, 52, 58, 0.08);
}
.ecrm-work-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--crm-border);
}
.ecrm-work-entry-head strong {
    color: var(--crm-graphite-dark);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.ecrm-work-entry-grid {
    align-items: end;
}
.ecrm-save-daily-builder {
    width: 100%;
    margin-top: 14px;
}
.ecrm-add-work-entry {
    width: 100%;
    justify-content: center;
    background: var(--crm-graphite);
    color: #fff;
    border-color: var(--crm-graphite);
}
.ecrm-add-work-entry:hover {
    background: var(--crm-graphite-dark);
    color: #fff;
}
.ecrm-remove-work-entry {
    margin-left: 10px;
}
.ecrm-work-entry-card:first-child .ecrm-remove-work-entry {
    display: none !important;
}
.ecrm-work-entry-card .ecrm-material-row {
    align-items: end;
}

@media (max-width: 760px) {
    .ecrm-daily-builder-card {
        padding: 14px;
    }
    .ecrm-daily-project-field,
    .ecrm-work-entry-card {
        border-radius: 16px;
        padding: 14px;
    }
    .ecrm-work-entry-head {
        align-items: stretch;
        flex-direction: column;
    }
    .ecrm-work-entry-head .crm-btn {
        width: 100%;
        justify-content: center;
    }
    .ecrm-work-entry-grid,
    .ecrm-daily-meta-grid,
    .ecrm-work-entry-card .ecrm-material-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .ecrm-work-entry-card input,
    .ecrm-work-entry-card select,
    .ecrm-work-entry-card textarea,
    .ecrm-daily-project-field select {
        min-height: 48px;
        font-size: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .ecrm-work-entry-card textarea {
        min-height: 76px;
    }
    .ecrm-save-daily-builder,
    .ecrm-add-work-entry {
        min-height: 50px;
        font-size: 15px;
    }
}


/* v2.0.49 – Daily work builder full-width and add button contrast fix */
.ecrm-daily-builder-card {
    width: 100%;
    max-width: none;
}
.ecrm-daily-builder-form {
    width: 100%;
}
.ecrm-add-work-entry,
.ecrm-add-work-entry:visited,
.ecrm-add-work-entry:focus,
.ecrm-add-work-entry:hover {
    color: #ffffff !important;
    background: var(--crm-graphite) !important;
    border-color: var(--crm-graphite) !important;
}
.ecrm-add-work-entry * {
    color: #ffffff !important;
}
.crm-main .ecrm-daily-builder-card,
.crm-card.ecrm-daily-builder-card {
    grid-column: 1 / -1;
}
@media (min-width: 761px) {
    .ecrm-daily-builder-card {
        max-width: none !important;
    }
}

/* v2.0.50 project assignment badges */
.crm-project-assignments {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.crm-assignment-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--crm-muted);
    font-size: 12px;
    line-height: 1.3;
}
.crm-assignment-line > span {
    font-weight: 800;
    color: #505760;
}
.crm-assignment-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}
.crm-person-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid var(--crm-border);
    color: var(--crm-text);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.crm-person-pill-has-color {
    border-color: color-mix(in srgb, var(--crm-person-color) 35%, var(--crm-border));
    background: color-mix(in srgb, var(--crm-person-color) 14%, #ffffff);
}
.crm-person-pill-has-color::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--crm-person-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-person-color) 16%, transparent);
}
@media (max-width: 720px) {
    .crm-assignment-line { align-items: flex-start; flex-direction: column; gap: 5px; }
    .crm-person-pill { white-space: normal; }
}

/* v2.0.53 - Responsive table and mobile chart fixes */
.crm-responsive-table-wrap {
    width: 100%;
    max-width: 100%;
}

.crm-projects-list-table .crm-project-title-link,
.crm-users-list-table .crm-colored-title {
    min-width: 0;
}

.crm-projects-list-table .crm-project-title-link > div,
.crm-users-list-table .crm-colored-title > strong {
    min-width: 0;
}

@media (max-width: 760px) {
    .crm-responsive-table-wrap {
        overflow-x: visible !important;
    }

    .crm-projects-list-table,
    .crm-users-list-table,
    .crm-report-project-status-table {
        min-width: 0 !important;
        width: 100% !important;
    }

    .crm-projects-list-table .crm-project-title-link,
    .crm-users-list-table .crm-colored-title,
    .crm-report-project-status-table .crm-colored-title {
        width: 100%;
        align-items: flex-start;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .crm-projects-list-table .crm-access-badges,
    .crm-projects-list-table .crm-user-badges,
    .crm-projects-list-table .crm-assignment-badges {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .crm-projects-list-table td[data-label="Mennyiségek"] .crm-mini-line {
        display: inline-block;
        margin: 2px 0 2px 6px;
    }

    .crm-users-list-table .crm-table-actions,
    .crm-users-list-table .crm-responsive-actions {
        justify-content: stretch;
    }

    .crm-daily-log-filter {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .crm-daily-log-filter .crm-field-inline,
    .crm-daily-log-filter input[type="date"],
    .crm-daily-log-filter .crm-button,
    .crm-daily-log-filter .crm-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .crm-chart-card {
        min-height: 0 !important;
        max-height: none;
        overflow: hidden;
    }

    .crm-chart-card canvas.ecrm-line-chart,
    .crm-chart-card canvas.ecrm-bar-chart {
        width: 100% !important;
        max-width: 100% !important;
        height: 220px !important;
        max-height: 220px !important;
        box-sizing: border-box;
    }

    .crm-chart-scroll canvas.ecrm-line-chart,
    .crm-chart-scroll canvas.ecrm-bar-chart {
        height: 300px !important;
        max-height: 300px !important;
    }
}

@media (max-width: 420px) {
    .crm-chart-card canvas.ecrm-line-chart,
    .crm-chart-card canvas.ecrm-bar-chart {
        height: 200px !important;
        max-height: 200px !important;
    }
}


/* v2.0.54 - Mobile UI refinements: project cards, date inputs, fixed charts */
@media (max-width: 760px) {
    /* Projektlista mobilon: leírás nélkül, csak név + hozzáférők */
    .crm-projects-list-table .crm-project-title-link small {
        display: none !important;
    }

    /* Dátum mezők ne lógjanak/le legyenek vágva napi munkáknál */
    .crm-daily-log-filter {
        display: grid !important;
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
        overflow: visible !important;
    }
    .crm-daily-log-filter .crm-field-inline {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .crm-daily-log-filter input[type="date"],
    .ecrm-daily-builder-card input[type="date"],
    .ecrm-daily-builder-form input[type="date"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin: 0 !important;
    }
    .ecrm-daily-meta-grid,
    .ecrm-daily-meta-grid .crm-field {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Grafikonok mobilon fix szélességen belül, oldalirányú scroll nélkül */
    .crm-chart-scroll,
    .crm-chart-full .crm-chart-scroll {
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px !important;
    }
    .crm-chart-card canvas.ecrm-line-chart,
    .crm-chart-card canvas.ecrm-bar-chart,
    .crm-chart-scroll canvas.ecrm-line-chart,
    .crm-chart-scroll canvas.ecrm-bar-chart,
    .ecrm-chart-large {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 260px !important;
        max-height: 260px !important;
        box-sizing: border-box !important;
    }
    .crm-chart-card {
        min-height: 0 !important;
    }
    .crm-chart-filter {
        overflow: visible !important;
    }
    .crm-chart-presets,
    .crm-chart-dates {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .crm-chart-dates label,
    .crm-chart-dates .crm-button {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .crm-chart-dates input[type="date"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 420px) {
    .crm-chart-presets,
    .crm-chart-dates {
        grid-template-columns: 1fr !important;
    }
    .crm-chart-card canvas.ecrm-line-chart,
    .crm-chart-card canvas.ecrm-bar-chart,
    .crm-chart-scroll canvas.ecrm-line-chart,
    .crm-chart-scroll canvas.ecrm-bar-chart,
    .ecrm-chart-large {
        height: 240px !important;
        max-height: 240px !important;
    }
}

/* v2.0.55 - mobile header cleanup */
.crm-mobile-header-actions {
    display: none;
}

.crm-mobile-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    cursor: pointer;
    padding: 0;
}
.crm-mobile-icon-btn:hover,
.crm-mobile-icon-btn:focus {
    background: rgba(242,163,26,.18);
    border-color: rgba(242,163,26,.35);
    color: #fff !important;
}
.crm-mobile-icon-btn .crm-menu-icon,
.crm-mobile-icon-btn .crm-menu-icon svg {
    width: 19px;
    height: 19px;
}
.crm-topbar-title {
    min-width: 0;
}
.crm-mobile-login-line .crm-person-pill {
    vertical-align: middle;
}

@media (max-width: 1000px) {
    .crm-sidebar {
        background: linear-gradient(180deg, var(--crm-graphite, #2f343a) 0%, var(--crm-graphite-dark, #23272c) 100%) !important;
    }
    .crm-brand {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        gap: 8px;
    }
    .crm-mobile-header-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-end;
    }
    .crm-brand-main {
        min-width: 0;
    }
    .crm-brand-text {
        display: none !important;
    }
    .crm-logo-img-sidebar {
        width: 42px !important;
        height: 42px !important;
        max-width: 42px !important;
        object-fit: contain;
        border-radius: 12px;
    }

    .crm-main {
        padding-top: 8px !important;
    }
    .crm-topbar {
        position: static !important;
        display: block !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        backdrop-filter: none !important;
    }
    .crm-topbar h1,
    .crm-topbar-user-actions,
    .crm-topbar .crm-user-badge,
    .crm-topbar .crm-logout-btn {
        display: none !important;
    }
    .crm-mobile-login-line {
        display: flex !important;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        margin: 0 !important;
        color: var(--crm-muted, #69707a) !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
    }
    .crm-mobile-login-line > span:first-child {
        font-weight: 800;
        color: var(--crm-muted, #69707a);
    }
    .crm-mobile-login-line .crm-person-pill {
        padding: 3px 8px;
        min-height: 0;
        font-size: 11px;
        line-height: 1.25;
        box-shadow: none;
    }

    .crm-global-search {
        display: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px;
    }
    .crm-app.crm-mobile-search-open .crm-global-search {
        display: block !important;
    }
    .crm-global-search input {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 42px;
        box-sizing: border-box;
    }
}

@media (max-width: 420px) {
    .crm-brand {
        grid-template-columns: 1fr auto auto;
        gap: 6px;
    }
    .crm-mobile-header-actions {
        gap: 6px;
    }
    .crm-mobile-icon-btn,
    .crm-nav-toggle {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
    }
    .crm-logo-img-sidebar {
        width: 38px !important;
        height: 38px !important;
        max-width: 38px !important;
    }
}


/* v2.0.56 - header margin and logo home link */
.crm-brand-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 0;
    text-decoration: none;
}
.crm-brand-logo-link:focus-visible {
    outline: 2px solid var(--crm-yellow, #f2b705);
    outline-offset: 3px;
    border-radius: 14px;
}
@media (max-width: 1000px) {
    .crm-mobile-login-line {
        margin-left: var(--crm-card-padding, 16px) !important;
        margin-right: var(--crm-card-padding, 16px) !important;
    }
}
@media (max-width: 420px) {
    .crm-mobile-login-line {
        margin-left: 14px !important;
        margin-right: 14px !important;
    }
}

/* V2.0.57 - Project matrix drag-scroll + surface group shading */
.crm-matrix-wrap {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(47,52,58,.28) rgba(47,52,58,.06);
}
.crm-matrix-wrap:active,
.crm-matrix-wrap.crm-dragging {
    cursor: grabbing;
}
.crm-matrix-wrap.crm-dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
}
.crm-matrix-wrap::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    float: right;
    width: 18px;
    height: 100%;
    min-height: 260px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(47,52,58,.08));
    z-index: 10;
}
.crm-matrix-table th.crm-matrix-group-alt,
.crm-matrix-table td.crm-matrix-group-alt {
    background-color: #f7f8f3;
}
.crm-matrix-table th.crm-matrix-surface.crm-matrix-group-alt {
    background-color: #e9edf0 !important;
    color: #2f343a;
}
.crm-matrix-table th.crm-matrix-workflow.crm-matrix-group-alt {
    background-color: #f1f3ef !important;
}
.crm-matrix-table td.crm-matrix-filled.crm-matrix-group-alt {
    background-color: #e7f6eb;
}
.crm-weekend-row td.crm-matrix-group-alt {
    background-color: #eceeea;
}
.crm-weekend-row td.crm-matrix-filled.crm-matrix-group-alt {
    background-color: #deefe4;
}

/* Mobile optimization build v2.0.58 */
@media (max-width: 767px) {
    .crm-card-title {
        margin-bottom: 14px;
    }

    .crm-actions {
        gap: 8px;
    }

    .crm-actions .crm-button,
    .crm-actions .crm-btn {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 0;
        padding: 10px 8px;
        font-size: 12px;
        text-align: center;
    }

    .crm-actions .crm-btn:last-child {
        flex-basis: 100%;
        width: 100%;
    }

    .crm-table-wrap,
    .crm-responsive-table-wrap,
    .crm-card table,
    .crm-panel table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        width: 100%;
    }

    .crm-card table,
    .crm-panel table {
        min-width: 720px;
    }

    .crm-matrix-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .crm-matrix-table {
        font-size: 11px;
    }

    .crm-matrix-table th,
    .crm-matrix-table td {
        padding: 4px 5px;
        min-width: 58px;
    }

    .crm-matrix-table th:first-child,
    .crm-matrix-table td:first-child {
        min-width: 110px;
    }
}

/* v2.0.59 – targeted mobile table fixes + stronger action buttons */
.crm-app {
    --crm-save-bg: #3ecc72;
    --crm-save-bg-hover: #34b864;
    --crm-save-border: #3ecc72;
    --crm-delete-bg: #d83737;
    --crm-delete-bg-hover: #c52f2f;
    --crm-delete-border: #d83737;
}

.crm-btn-save,
.crm-button.crm-btn-save {
    background: var(--crm-save-bg) !important;
    color: #000 !important;
    border-color: var(--crm-save-border) !important;
    box-shadow: 0 8px 18px rgba(22, 101, 52, .18) !important;
}

.crm-btn-save:hover,
.crm-button.crm-btn-save:hover {
    background: var(--crm-save-bg-hover) !important;
    color: #000 !important;
}

.crm-btn-danger,
.crm-button.crm-btn-danger {
    background: var(--crm-delete-bg) !important;
    color: #fff !important;
    border-color: var(--crm-delete-border) !important;
    box-shadow: 0 8px 18px rgba(153, 27, 27, .18) !important;
}

.crm-btn-danger:hover,
.crm-button.crm-btn-danger:hover {
    background: var(--crm-delete-bg-hover) !important;
    color: #fff !important;
}

@media (max-width: 767px) {
    .crm-mobile-table-wrap {
        overflow: visible;
    }

    .crm-mobile-card-table,
    .crm-mobile-card-table thead,
    .crm-mobile-card-table tbody,
    .crm-mobile-card-table tr,
    .crm-mobile-card-table th,
    .crm-mobile-card-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .crm-mobile-card-table {
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .crm-mobile-card-table thead {
        display: none;
    }

    .crm-mobile-card-table tbody tr {
        margin: 0 0 12px;
        padding: 12px;
        border: 1px solid var(--crm-border);
        border-radius: var(--crm-radius-lg);
        background: #fff;
        box-shadow: var(--crm-shadow-soft);
    }

    .crm-mobile-card-table th,
    .crm-mobile-card-table td,
    .crm-mobile-card-table th:first-child,
    .crm-mobile-card-table td:first-child {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        background: transparent !important;
    }

    .crm-mobile-card-table td {
        display: grid;
        grid-template-columns: minmax(108px, 36%) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 9px 0;
        border-bottom: 1px solid var(--crm-border);
        text-align: right;
        white-space: normal;
        word-break: break-word;
    }

    .crm-mobile-card-table td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .crm-mobile-card-table td::before {
        content: attr(data-label);
        color: var(--crm-muted);
        font-size: 11px;
        font-weight: 900;
        line-height: 1.2;
        text-transform: uppercase;
        letter-spacing: .04em;
        text-align: left;
    }

    .crm-mobile-card-table td > * {
        min-width: 0;
        justify-self: end;
    }

    .crm-mobile-card-table td:first-child {
        grid-template-columns: 1fr;
        text-align: left;
        padding-top: 0;
    }

    .crm-mobile-card-table td:first-child::before {
        display: none;
    }

    .crm-mobile-card-table td:first-child > * {
        justify-self: start;
    }

    .crm-mobile-card-table .crm-responsive-actions,
    .crm-mobile-card-table td.crm-actions {
        display: flex;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
    }

    .crm-mobile-card-table .crm-responsive-actions::before,
    .crm-mobile-card-table td.crm-actions::before {
        flex: 0 0 108px;
    }
}

@media (max-width: 420px) {
    .crm-mobile-card-table td {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 5px;
    }

    .crm-mobile-card-table td > *,
    .crm-mobile-card-table td:first-child > * {
        justify-self: stretch;
    }

    .crm-mobile-card-table .crm-responsive-actions,
    .crm-mobile-card-table td.crm-actions {
        justify-content: stretch;
    }

    .crm-mobile-card-table .crm-btn,
    .crm-mobile-card-table .crm-button,
    .crm-mobile-card-table .crm-inline-form,
    .crm-mobile-card-table .crm-inline-form button {
        width: 100%;
    }
}


/* v2.0.60 – exact button colors + real mobile card tables (no horizontal scroll) */
.crm-app .crm-btn-save,
.crm-app .crm-button.crm-btn-save,
.crm-app button.crm-btn-save,
.crm-app input[type="submit"].crm-btn-save {
    background: #3ecc72 !important;
    color: #000000 !important;
    border-color: #3ecc72 !important;
}

.crm-app .crm-btn-danger,
.crm-app .crm-button.crm-btn-danger,
.crm-app button.crm-btn-danger,
.crm-app input[type="submit"].crm-btn-danger {
    background: #d83737 !important;
    color: #fff !important;
    border-color: #d83737 !important;
}

@media (max-width: 767px) {
    .crm-app .crm-mobile-table-wrap,
    .crm-app .crm-table-wrap:has(.crm-mobile-card-table) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: auto !important;
    }

    .crm-app table.crm-mobile-card-table,
    .crm-app .crm-card table.crm-mobile-card-table,
    .crm-app .crm-panel table.crm-mobile-card-table,
    .crm-app .crm-project-costs-table,
    .crm-app .crm-operating-allocation-table,
    .crm-app .crm-extra-works-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: auto !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .crm-app table.crm-mobile-card-table thead,
    .crm-app .crm-project-costs-table thead,
    .crm-app .crm-operating-allocation-table thead,
    .crm-app .crm-extra-works-table thead {
        display: none !important;
    }

    .crm-app table.crm-mobile-card-table tbody,
    .crm-app table.crm-mobile-card-table tr,
    .crm-app table.crm-mobile-card-table td,
    .crm-app .crm-project-costs-table tbody,
    .crm-app .crm-project-costs-table tr,
    .crm-app .crm-project-costs-table td,
    .crm-app .crm-operating-allocation-table tbody,
    .crm-app .crm-operating-allocation-table tr,
    .crm-app .crm-operating-allocation-table td,
    .crm-app .crm-extra-works-table tbody,
    .crm-app .crm-extra-works-table tr,
    .crm-app .crm-extra-works-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .crm-app table.crm-mobile-card-table tr,
    .crm-app .crm-project-costs-table tr,
    .crm-app .crm-operating-allocation-table tr,
    .crm-app .crm-extra-works-table tr {
        margin: 0 0 12px !important;
        padding: 12px !important;
        border: 1px solid var(--crm-border) !important;
        border-radius: var(--crm-radius-lg) !important;
        background: #fff !important;
        box-shadow: var(--crm-shadow-soft) !important;
    }

    .crm-app table.crm-mobile-card-table td,
    .crm-app .crm-project-costs-table td,
    .crm-app .crm-operating-allocation-table td,
    .crm-app .crm-extra-works-table td {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        display: grid !important;
        grid-template-columns: minmax(104px, 34%) minmax(0, 1fr) !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 8px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid var(--crm-border) !important;
        background: transparent !important;
        text-align: right !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .crm-app table.crm-mobile-card-table td:last-child,
    .crm-app .crm-project-costs-table td:last-child,
    .crm-app .crm-operating-allocation-table td:last-child,
    .crm-app .crm-extra-works-table td:last-child {
        border-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .crm-app table.crm-mobile-card-table td::before,
    .crm-app .crm-project-costs-table td::before,
    .crm-app .crm-operating-allocation-table td::before,
    .crm-app .crm-extra-works-table td::before {
        content: attr(data-label) !important;
        display: block !important;
        color: var(--crm-muted) !important;
        font-size: 11px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
        text-transform: uppercase !important;
        letter-spacing: .04em !important;
        text-align: left !important;
    }

    .crm-app table.crm-mobile-card-table td:first-child,
    .crm-app .crm-project-costs-table td:first-child,
    .crm-app .crm-operating-allocation-table td:first-child,
    .crm-app .crm-extra-works-table td:first-child {
        grid-template-columns: 1fr !important;
        text-align: left !important;
        padding-top: 0 !important;
        font-weight: 700 !important;
    }

    .crm-app table.crm-mobile-card-table td:first-child::before,
    .crm-app .crm-project-costs-table td:first-child::before,
    .crm-app .crm-operating-allocation-table td:first-child::before,
    .crm-app .crm-extra-works-table td:first-child::before {
        display: none !important;
    }

    .crm-app table.crm-mobile-card-table td > *,
    .crm-app .crm-project-costs-table td > *,
    .crm-app .crm-operating-allocation-table td > *,
    .crm-app .crm-extra-works-table td > * {
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: end !important;
    }

    .crm-app table.crm-mobile-card-table td:first-child > *,
    .crm-app .crm-project-costs-table td:first-child > *,
    .crm-app .crm-operating-allocation-table td:first-child > *,
    .crm-app .crm-extra-works-table td:first-child > * {
        justify-self: start !important;
    }

    .crm-app table.crm-mobile-card-table td.crm-responsive-actions,
    .crm-app .crm-mobile-card-table .crm-responsive-actions,
    .crm-app .crm-extra-works-table td.crm-actions {
        display: flex !important;
        justify-content: flex-end !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
}

@media (max-width: 420px) {
    .crm-app table.crm-mobile-card-table td,
    .crm-app .crm-project-costs-table td,
    .crm-app .crm-operating-allocation-table td,
    .crm-app .crm-extra-works-table td {
        grid-template-columns: 1fr !important;
        text-align: left !important;
        gap: 5px !important;
    }

    .crm-app table.crm-mobile-card-table td > *,
    .crm-app .crm-project-costs-table td > *,
    .crm-app .crm-operating-allocation-table td > *,
    .crm-app .crm-extra-works-table td > * {
        justify-self: stretch !important;
    }
}

/* v2.0.61 – Felületek mobile width fix
   A v2.0.58 általános .crm-card table min-width:720px szabálya túl szélessé tette
   a Felületek és Felület munkafolyamat táblákat mobilon. Ezek kártyás nézetben
   maradnak, ezért mobilon nem kaphatnak fix/minimum desktop szélességet. */
@media (max-width: 767px) {
    .crm-app .crm-card table.crm-surface-table,
    .crm-app .crm-card table.crm-workflow-table,
    .crm-app table.crm-surface-table,
    .crm-app table.crm-workflow-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: auto !important;
        overflow: visible !important;
    }

    .crm-app .crm-surface-table thead,
    .crm-app .crm-workflow-table thead {
        display: none !important;
    }

    .crm-app .crm-surface-table tbody,
    .crm-app .crm-surface-table tr,
    .crm-app .crm-surface-table td,
    .crm-app .crm-workflow-table tbody,
    .crm-app .crm-workflow-table tr,
    .crm-app .crm-workflow-table td {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .crm-app .crm-surface-table td,
    .crm-app .crm-workflow-table td {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .crm-app .crm-surface-table .crm-progress,
    .crm-app .crm-workflow-table .crm-progress {
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* v2.0.62 – további mobilos táblázat refaktor
   Teljesítmény, működési költségek alsó lista, értesítések, jogosultságok,
   audit napló és lomtár: mobilon ne desktop táblaként / vízszintes scrollal jelenjenek meg,
   hanem kártyás, 100%-os szélességű reszponzív elemekként. */
@media (max-width: 767px) {
    .crm-app .crm-mobile-table-wrap,
    .crm-app .crm-table-wrap.crm-mobile-table-wrap,
    .crm-app .crm-table-wrap.crm-table-sticky.crm-mobile-table-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: auto !important;
    }

    .crm-app table.crm-performance-report-table,
    .crm-app table.crm-commission-rules-table,
    .crm-app table.crm-operating-costs-list-table,
    .crm-app table.crm-notification-table,
    .crm-app table.crm-permissions-worker-table,
    .crm-app table.crm-permissions-role-table,
    .crm-app table.crm-audit-table,
    .crm-app table.crm-trash-table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .crm-app table.crm-performance-report-table thead,
    .crm-app table.crm-commission-rules-table thead,
    .crm-app table.crm-operating-costs-list-table thead,
    .crm-app table.crm-notification-table thead,
    .crm-app table.crm-permissions-worker-table thead,
    .crm-app table.crm-permissions-role-table thead,
    .crm-app table.crm-audit-table thead,
    .crm-app table.crm-trash-table thead {
        display: none !important;
    }

    .crm-app table.crm-performance-report-table tbody,
    .crm-app table.crm-performance-report-table tr,
    .crm-app table.crm-performance-report-table td,
    .crm-app table.crm-commission-rules-table tbody,
    .crm-app table.crm-commission-rules-table tr,
    .crm-app table.crm-commission-rules-table td,
    .crm-app table.crm-operating-costs-list-table tbody,
    .crm-app table.crm-operating-costs-list-table tr,
    .crm-app table.crm-operating-costs-list-table td,
    .crm-app table.crm-notification-table tbody,
    .crm-app table.crm-notification-table tr,
    .crm-app table.crm-notification-table td,
    .crm-app table.crm-permissions-worker-table tbody,
    .crm-app table.crm-permissions-worker-table tr,
    .crm-app table.crm-permissions-worker-table td,
    .crm-app table.crm-permissions-role-table tbody,
    .crm-app table.crm-permissions-role-table tr,
    .crm-app table.crm-permissions-role-table td,
    .crm-app table.crm-audit-table tbody,
    .crm-app table.crm-audit-table tr,
    .crm-app table.crm-audit-table td,
    .crm-app table.crm-trash-table tbody,
    .crm-app table.crm-trash-table tr,
    .crm-app table.crm-trash-table td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .crm-app table.crm-performance-report-table tr,
    .crm-app table.crm-commission-rules-table tr,
    .crm-app table.crm-operating-costs-list-table tr,
    .crm-app table.crm-notification-table tr,
    .crm-app table.crm-permissions-worker-table tr,
    .crm-app table.crm-permissions-role-table tr,
    .crm-app table.crm-audit-table tr,
    .crm-app table.crm-trash-table tr {
        margin: 0 0 12px !important;
        padding: 12px !important;
        border: 1px solid var(--crm-border) !important;
        border-radius: var(--crm-radius-lg) !important;
        background: #fff !important;
        box-shadow: var(--crm-shadow-soft) !important;
    }

    .crm-app table.crm-performance-report-table td,
    .crm-app table.crm-commission-rules-table td,
    .crm-app table.crm-operating-costs-list-table td,
    .crm-app table.crm-notification-table td,
    .crm-app table.crm-permissions-worker-table td,
    .crm-app table.crm-permissions-role-table td,
    .crm-app table.crm-audit-table td,
    .crm-app table.crm-trash-table td {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
        display: grid !important;
        grid-template-columns: minmax(104px, 34%) minmax(0, 1fr) !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 8px 0 !important;
        border: 0 !important;
        border-bottom: 1px solid var(--crm-border) !important;
        background: transparent !important;
        text-align: right !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .crm-app table.crm-performance-report-table td::before,
    .crm-app table.crm-commission-rules-table td::before,
    .crm-app table.crm-operating-costs-list-table td::before,
    .crm-app table.crm-notification-table td::before,
    .crm-app table.crm-permissions-worker-table td::before,
    .crm-app table.crm-permissions-role-table td::before,
    .crm-app table.crm-audit-table td::before,
    .crm-app table.crm-trash-table td::before {
        content: attr(data-label) !important;
        display: block !important;
        color: var(--crm-muted) !important;
        font-size: 11px !important;
        font-weight: 900 !important;
        line-height: 1.2 !important;
        text-align: left !important;
        text-transform: uppercase !important;
        letter-spacing: .04em !important;
    }

    .crm-app table.crm-performance-report-table td:last-child,
    .crm-app table.crm-commission-rules-table td:last-child,
    .crm-app table.crm-operating-costs-list-table td:last-child,
    .crm-app table.crm-notification-table td:last-child,
    .crm-app table.crm-permissions-worker-table td:last-child,
    .crm-app table.crm-permissions-role-table td:last-child,
    .crm-app table.crm-audit-table td:last-child,
    .crm-app table.crm-trash-table td:last-child {
        border-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .crm-app table.crm-performance-report-table td:first-child,
    .crm-app table.crm-commission-rules-table td:first-child,
    .crm-app table.crm-operating-costs-list-table td:first-child,
    .crm-app table.crm-notification-table td:first-child,
    .crm-app table.crm-permissions-worker-table td:first-child,
    .crm-app table.crm-permissions-role-table td:first-child,
    .crm-app table.crm-audit-table td:first-child,
    .crm-app table.crm-trash-table td:first-child {
        grid-template-columns: 1fr !important;
        text-align: left !important;
        padding-top: 0 !important;
        font-weight: 700 !important;
    }

    .crm-app table.crm-performance-report-table td:first-child::before,
    .crm-app table.crm-commission-rules-table td:first-child::before,
    .crm-app table.crm-operating-costs-list-table td:first-child::before,
    .crm-app table.crm-notification-table td:first-child::before,
    .crm-app table.crm-permissions-worker-table td:first-child::before,
    .crm-app table.crm-permissions-role-table td:first-child::before,
    .crm-app table.crm-audit-table td:first-child::before,
    .crm-app table.crm-trash-table td:first-child::before {
        display: none !important;
    }

    .crm-app table.crm-performance-report-table td > *,
    .crm-app table.crm-commission-rules-table td > *,
    .crm-app table.crm-operating-costs-list-table td > *,
    .crm-app table.crm-notification-table td > *,
    .crm-app table.crm-permissions-worker-table td > *,
    .crm-app table.crm-permissions-role-table td > *,
    .crm-app table.crm-audit-table td > *,
    .crm-app table.crm-trash-table td > * {
        min-width: 0 !important;
        max-width: 100% !important;
        justify-self: end !important;
    }

    .crm-app table.crm-performance-report-table td:first-child > *,
    .crm-app table.crm-commission-rules-table td:first-child > *,
    .crm-app table.crm-operating-costs-list-table td:first-child > *,
    .crm-app table.crm-notification-table td:first-child > *,
    .crm-app table.crm-permissions-worker-table td:first-child > *,
    .crm-app table.crm-permissions-role-table td:first-child > *,
    .crm-app table.crm-audit-table td:first-child > *,
    .crm-app table.crm-trash-table td:first-child > * {
        justify-self: start !important;
    }

    .crm-app table.crm-commission-rules-table td.crm-responsive-actions,
    .crm-app table.crm-operating-costs-list-table td.crm-responsive-actions,
    .crm-app table.crm-trash-table td.crm-responsive-actions {
        display: flex !important;
        justify-content: flex-end !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .crm-app table.crm-notification-table .crm-switch,
    .crm-app table.crm-permissions-worker-table input[type="radio"],
    .crm-app table.crm-permissions-role-table input[type="checkbox"] {
        justify-self: end !important;
    }

    .crm-app table.crm-audit-table .crm-badge {
        max-width: 100% !important;
        white-space: normal !important;
    }
}

@media (max-width: 420px) {
    .crm-app table.crm-performance-report-table td,
    .crm-app table.crm-commission-rules-table td,
    .crm-app table.crm-operating-costs-list-table td,
    .crm-app table.crm-notification-table td,
    .crm-app table.crm-permissions-worker-table td,
    .crm-app table.crm-permissions-role-table td,
    .crm-app table.crm-audit-table td,
    .crm-app table.crm-trash-table td {
        grid-template-columns: 1fr !important;
        text-align: left !important;
        gap: 5px !important;
    }

    .crm-app table.crm-performance-report-table td > *,
    .crm-app table.crm-commission-rules-table td > *,
    .crm-app table.crm-operating-costs-list-table td > *,
    .crm-app table.crm-notification-table td > *,
    .crm-app table.crm-permissions-worker-table td > *,
    .crm-app table.crm-permissions-role-table td > *,
    .crm-app table.crm-audit-table td > *,
    .crm-app table.crm-trash-table td > * {
        justify-self: stretch !important;
    }
}


/* v2.0.63 – mobil header sorrend + 2 oszlopos stat kártyák
   Header mobilon: balról Kilépés, Keresés, jobb szélen Menü.
   Stat/összeg kártyák mobilon: ahol .crm-stat elemek vannak gridben, ne 1 oszlopban
   fussanak, hanem 2 oszlopban, hogy kevesebb függőleges helyet foglaljanak. */
@media (max-width: 1000px) {
    .crm-brand {
        grid-template-columns: minmax(0, 1fr) auto auto !important;
    }

    .crm-mobile-header-actions {
        order: 2 !important;
    }

    .crm-nav-toggle {
        order: 3 !important;
    }

    .crm-brand-main {
        order: 1 !important;
    }
}

@media (max-width: 767px) {
    .crm-app .crm-grid:has(> .crm-stat),
    .crm-app .crm-grid-2:has(> .crm-stat),
    .crm-app .crm-grid-3:has(> .crm-stat),
    .crm-app .crm-grid-4:has(> .crm-stat),
    .crm-app .crm-grid-5:has(> .crm-stat) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .crm-app .crm-stat {
        padding: 13px 12px !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .crm-app .crm-stat::before {
        top: 12px !important;
        bottom: 12px !important;
        width: 3px !important;
    }

    .crm-app .crm-stat span {
        margin-bottom: 5px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        letter-spacing: .03em !important;
        overflow-wrap: anywhere !important;
    }

    .crm-app .crm-stat strong {
        font-size: clamp(15px, 4.2vw, 19px) !important;
        line-height: 1.15 !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .crm-app .crm-stat small {
        margin-top: 4px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        overflow-wrap: anywhere !important;
    }
}

@media (max-width: 360px) {
    .crm-app .crm-grid:has(> .crm-stat),
    .crm-app .crm-grid-2:has(> .crm-stat),
    .crm-app .crm-grid-3:has(> .crm-stat),
    .crm-app .crm-grid-4:has(> .crm-stat),
    .crm-app .crm-grid-5:has(> .crm-stat) {
        gap: 8px !important;
    }

    .crm-app .crm-stat {
        padding: 11px 10px !important;
    }

    .crm-app .crm-stat strong {
        font-size: 14px !important;
    }
}

/* V2.0.64: Performance dashboard */
.crm-app .crm-performance-filter {
    margin-top: 16px;
}

.crm-app .crm-performance-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}

.crm-app .crm-performance-kpis {
    margin-top: 18px;
}

.crm-app .crm-performance-kpis .crm-stat small,
.crm-app .crm-performance-ranking-list small,
.crm-app .crm-performance-unit-list small {
    display: block;
    margin-top: 3px;
    color: var(--crm-muted);
    font-size: 12px;
    font-weight: 700;
}

.crm-app .crm-performance-charts .crm-chart-card canvas {
    max-width: 100%;
}

.crm-app .crm-performance-detail-section {
    margin-top: 18px;
}

@media (max-width: 760px) {
    .crm-app .crm-performance-filter {
        gap: 10px;
    }

    .crm-app .crm-performance-filter .crm-chart-presets,
    .crm-app .crm-performance-mode-switch {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .crm-app .crm-performance-filter .crm-chip,
    .crm-app .crm-performance-mode-switch .crm-chip {
        justify-content: center;
        text-align: center;
        padding: 9px 8px;
        font-size: 12px;
    }

    .crm-app .crm-performance-filter .crm-chart-dates {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .crm-app .crm-performance-kpis.crm-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .crm-app .crm-performance-kpis .crm-stat {
        min-height: 0;
        padding: 12px 10px !important;
    }

    .crm-app .crm-performance-kpis .crm-stat span {
        font-size: 11px !important;
        line-height: 1.25;
    }

    .crm-app .crm-performance-kpis .crm-stat strong {
        font-size: 17px !important;
        line-height: 1.15;
        word-break: break-word;
    }

    .crm-app .crm-performance-kpis .crm-stat small {
        font-size: 10px;
    }

    .crm-app .crm-performance-charts.crm-grid-2,
    .crm-app .crm-performance-detail-section + .crm-grid-2 {
        grid-template-columns: 1fr !important;
    }
}


/* V2.0.66: Performance real unit breakdown dashboard */
.crm-performance-unit-breakdown,
.crm-performance-work-breakdown { margin-top: 18px; }
.crm-performance-unit-card .crm-section-head { margin-bottom: 10px; }
.crm-performance-work-charts { margin-bottom: 16px; }
.crm-performance-work-table td[data-label="Munka"],
.crm-performance-work-table td[data-label="Felület"] { max-width: 260px; }
@media (max-width: 760px) {
  .crm-performance-unit-cards,
  .crm-performance-work-charts { grid-template-columns: 1fr !important; }
  .crm-performance-unit-card .crm-card-title,
  .crm-performance-work-breakdown .crm-card-title { font-size: 16px; }
  .crm-performance-unit-card canvas,
  .crm-performance-work-charts canvas { width: 100% !important; }
}


/* v2.0.72 - dashboard/daily recent work card layout */
.crm-recent-work-item {
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
}
.crm-recent-work-date {
    flex: 0 0 48px;
    min-width: 48px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 8px 6px;
    border-radius: 0;
    background: rgba(242, 163, 26, .16);
    color: var(--crm-text);
    line-height: 1;
    align-self: stretch;
}
.crm-recent-work-date span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--crm-muted);
}
.crm-recent-work-date strong {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 900;
}
.crm-recent-work-content {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 3px;
    padding: 12px 14px;
}
.crm-recent-work-content small {
    margin-top: 0;
}
.crm-recent-work-worker,
.crm-recent-work-project {
    min-width: 0;
}
.crm-recent-work-flow {
    color: var(--crm-muted);
    font-size: 13px;
}
.crm-recent-work-quantity {
    margin-top: 2px;
    font-weight: 900;
    color: var(--crm-text);
}
@media (max-width: 700px) {
    .crm-list-item.crm-recent-work-item {
        flex-direction: row;
        align-items: stretch;
    }
    .crm-recent-work-date {
        flex-basis: 42px;
        min-width: 42px;
        padding: 7px 5px;
    }
    .crm-recent-work-content {
        padding: 10px 12px;
    }
    .crm-recent-work-date strong {
        font-size: 18px;
    }
    .crm-recent-work-flow,
    .crm-recent-work-content small {
        font-size: 12px;
    }
    .crm-recent-work-quantity {
        font-size: 13px;
    }
}

/* v2.0.70 - sidebar version and credit below menu */
.crm-sidebar {
    display: flex;
    flex-direction: column;
}
.crm-menu {
    flex: 0 0 auto;
    align-content: start;
}
.crm-sidebar-meta {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.crm-sidebar-version {
    font-size: 11px;
    line-height: 1;
    color: rgba(255,255,255,.42);
    font-weight: 700;
    letter-spacing: .03em;
}
.crm-sidebar-credit {
    display: inline-block;
    margin-top: 10px;
    color: #ff9f1c !important;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 600;
    text-decoration: none !important;
}
.crm-sidebar-credit strong {
    color: #ff9f1c !important;
    font-weight: 800;
}
.crm-sidebar-credit:hover {
    color: #ffb347 !important;
}
.crm-mobile-version-badge {
    display: none !important;
}
@media (max-width: 1000px) {
    .crm-sidebar-meta {
        display: none !important;
        margin-top: 10px !important;
        padding-top: 12px !important;
        border-top: 1px solid rgba(255,255,255,.14) !important;
        text-align: left;
    }
    .crm-app.crm-mobile-menu-open .crm-sidebar-meta {
        display: block !important;
    }
    .crm-app.crm-mobile-menu-open .crm-sidebar-version {
        display: none !important;
    }
    .crm-app.crm-mobile-menu-open .crm-sidebar-credit {
        margin-top: 0 !important;
        padding-left: 2px;
        font-size: 11px !important;
    }
    .crm-brand-main {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .crm-mobile-version-badge {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 3px 7px;
        border-radius: 999px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.12);
        color: rgba(255,255,255,.68) !important;
        font-size: 10px !important;
        line-height: 1 !important;
        font-weight: 800;
        white-space: nowrap;
    }
}


/* v2.0.72 - Napi munka mobil kártyás lista */
.crm-daily-mobile-cards {
    display: none;
}

@media (max-width: 700px) {
    .crm-daily-mobile-cards {
        display: grid;
        gap: 10px;
    }

    .crm-daily-logs-table {
        display: none !important;
    }

    .crm-daily-mobile-card {
        width: 100%;
    }
}


/* v2.0.72 - recent work date strip + mobile daily log cards */
.crm-list-item.crm-recent-work-item {
    padding: 0;
    overflow: hidden;
}
.crm-recent-work-date {
    align-self: stretch;
    margin: 0;
    border-radius: 0;
    min-height: 100%;
    padding: 10px 6px;
    background: rgba(242, 163, 26, .16);
}
.crm-recent-work-content {
    padding: 12px 14px 12px 0;
}
.crm-daily-log-mobile-list {
    display: none;
}
@media (max-width: 700px) {
    .crm-daily-logs-table {
        display: none !important;
    }
    .crm-daily-log-mobile-list {
        display: grid;
        margin-top: 12px;
    }
    .crm-list-item.crm-recent-work-item {
        padding: 0 !important;
        overflow: hidden;
    }
    .crm-recent-work-date {
        align-self: stretch;
        border-radius: 0;
        padding: 8px 5px;
    }
    .crm-recent-work-content {
        padding: 10px 12px 10px 0;
    }
}
@media (min-width: 701px) {
    .crm-daily-log-mobile-list {
        display: none !important;
    }
}


/* v2.0.74 - mobile dashboard navigation buttons */
.crm-mobile-card-action,
.crm-mobile-dashboard-performance-action {
    display: none;
}

@media (max-width: 700px) {
    .crm-mobile-card-action {
        display: block;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .crm-mobile-dashboard-nav-btn {
        width: 100%;
        min-height: 42px;
        justify-content: center;
        text-align: center;
        background: #f28c28 !important;
        color: #ffffff !important;
        border-color: #f28c28 !important;
    }

    .crm-mobile-dashboard-nav-btn:hover,
    .crm-mobile-dashboard-nav-btn:focus {
        background: #e67f1f !important;
        color: #ffffff !important;
        border-color: #e67f1f !important;
    }

    .crm-mobile-dashboard-performance-action {
        display: block;
        margin-top: 12px;
    }

    .crm-mobile-dashboard-performance-action .crm-button {
        display: flex;
    }
}


/* v2.0.75 - mobile spacing and intro text refinement */
@media (max-width: 700px) {
    .crm-mobile-dashboard-performance-action {
        margin-bottom: 40px !important;
    }

    .crm-recent-work-content {
        padding-left: 12px !important;
    }

    .crm-list-item.crm-recent-work-item .crm-recent-work-date + .crm-recent-work-content {
        margin-left: 0 !important;
    }

    .crm-section-head {
        width: 100%;
    }

    .crm-section-head > div,
    .crm-page-header > div {
        width: 100%;
        min-width: 0;
    }

    .crm-topbar p,
    .crm-section-head p,
    .crm-page-header p,
    .crm-card > p:first-of-type {
        width: 100%;
        max-width: none;
        font-size: 12px !important;
        line-height: 1.55;
        text-align: justify;
        text-justify: inter-word;
    }
}


/* v2.0.76 - global recent work spacing + compact mobile project module cards */
.crm-list-item.crm-recent-work-item .crm-recent-work-date + .crm-recent-work-content,
.crm-recent-work-content {
    padding-left: 14px !important;
}

@media (max-width: 700px) {
    .crm-project-module-grid.crm-grid,
    .crm-project-module-grid.crm-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .crm-project-module-grid .crm-module {
        min-height: 92px !important;
        padding: 14px 10px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        text-align: center !important;
    }

    .crm-project-module-grid .crm-module-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 12px !important;
    }

    .crm-project-module-grid .crm-module-icon svg {
        width: 19px !important;
        height: 19px !important;
    }

    .crm-project-module-grid .crm-module-title {
        font-size: 13px !important;
        line-height: 1.18 !important;
        margin: 0 !important;
    }

    .crm-project-module-grid .crm-module-desc {
        display: none !important;
    }
}

/* v2.0.77 - daily work v2 quick capture */
.ecrm-daily-quick-dashboard {
    display: grid;
    gap: 14px;
    margin: 12px 0 18px;
}

.ecrm-daily-today-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ecrm-daily-stat-mini {
    border: 1px solid rgba(47, 52, 58, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    padding: 12px 14px;
}

.ecrm-daily-stat-mini span,
.ecrm-daily-quick-title {
    display: block;
    font-size: 12px;
    color: rgba(47, 52, 58, .62);
    font-weight: 700;
    margin-bottom: 4px;
}

.ecrm-daily-stat-mini strong {
    display: block;
    font-size: 18px;
    line-height: 1.15;
}

.ecrm-daily-project-chips,
.ecrm-daily-workflow-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ecrm-daily-project-chip,
.ecrm-daily-workflow-chip {
    border: 1px solid rgba(47, 52, 58, .12);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #2f343a;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(47, 52, 58, .05);
}

.ecrm-daily-workflow-chip {
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 150px;
}

.ecrm-daily-workflow-chip span {
    font-size: 12px;
    color: rgba(47, 52, 58, .68);
    font-weight: 600;
}

.ecrm-today-logs-accordion {
    border: 1px solid rgba(47, 52, 58, .1);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.ecrm-today-logs-accordion summary {
    cursor: pointer;
    padding: 11px 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ecrm-today-log-list {
    display: grid;
    gap: 8px;
    padding: 0 10px 10px;
}

.ecrm-today-log-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: center;
    border: 1px solid rgba(47, 52, 58, .08);
    border-radius: 12px;
    padding: 9px 10px;
    background: rgba(247, 248, 250, .8);
}

.ecrm-today-log-item small,
.ecrm-today-log-item span {
    display: block;
    font-size: 12px;
    color: rgba(47, 52, 58, .7);
    margin-top: 2px;
}

.ecrm-repeat-daily-log {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #e67f1f;
    color: #fff;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 700px) {
    .ecrm-daily-builder-card {
        padding: 14px !important;
    }

    .ecrm-daily-quick-dashboard {
        gap: 10px;
        margin: 8px 0 12px;
    }

    .ecrm-daily-today-stats {
        gap: 8px;
    }

    .ecrm-daily-stat-mini {
        padding: 9px 10px;
        border-radius: 12px;
    }

    .ecrm-daily-stat-mini span,
    .ecrm-daily-quick-title {
        font-size: 11px !important;
        margin-bottom: 2px;
    }

    .ecrm-daily-stat-mini strong {
        font-size: 14px;
    }

    .ecrm-daily-project-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .ecrm-daily-project-chip {
        width: 100%;
        justify-content: flex-start;
        padding: 8px 9px;
        min-height: 38px;
        font-size: 12px;
        border-radius: 12px;
    }

    .ecrm-daily-workflow-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .ecrm-daily-workflow-chip {
        min-width: 0;
        width: 100%;
        padding: 8px 9px;
        gap: 1px;
        border-radius: 12px;
    }

    .ecrm-daily-workflow-chip strong {
        font-size: 12px;
        line-height: 1.15;
    }

    .ecrm-daily-workflow-chip span {
        font-size: 10.5px;
        line-height: 1.25;
    }

    .ecrm-today-logs-accordion summary {
        padding: 9px 11px;
        font-size: 12px;
    }

    .ecrm-today-log-list {
        gap: 6px;
        padding: 0 8px 8px;
    }

    .ecrm-today-log-item {
        grid-template-columns: minmax(0, 1fr) 34px;
        padding: 7px 8px;
    }

    .ecrm-today-log-item strong {
        font-size: 12px;
    }

    .ecrm-today-log-item small,
    .ecrm-today-log-item span {
        font-size: 10.5px;
    }

    .ecrm-repeat-daily-log {
        width: 31px;
        height: 31px;
        font-size: 17px;
    }

    .ecrm-daily-meta-grid.crm-grid,
    .ecrm-work-entry-grid.crm-grid,
    .ecrm-work-entry-grid.crm-grid-4 {
        gap: 8px !important;
    }

    .ecrm-work-entry-card {
        padding: 10px !important;
    }
}

/* v2.0.78 - simplified daily work row capture */
.ecrm-daily-simple-card .crm-card-title {
    margin-bottom: 14px;
}
.ecrm-daily-simple-form {
    display: grid;
    gap: 14px;
}
.ecrm-work-entry-simple {
    border: 1px solid rgba(47, 52, 58, .1);
    background: rgba(255,255,255,.82);
}
.ecrm-work-entry-simple-grid.crm-grid,
.ecrm-work-entry-simple-grid.crm-grid-5 {
    grid-template-columns: minmax(170px, 1.25fr) minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(110px, .75fr) minmax(135px, .85fr);
    gap: 10px;
    align-items: end;
}
.ecrm-work-more-details {
    margin-top: 10px;
}
.ecrm-work-more-details > summary {
    font-weight: 800;
}
.ecrm-work-more-details > summary span {
    font-weight: 600;
    opacity: .58;
    margin-left: 6px;
}
.ecrm-work-more-body {
    margin-top: 10px;
}
.ecrm-work-extra-grid.crm-grid,
.ecrm-work-extra-grid.crm-grid-2 {
    grid-template-columns: minmax(120px, .55fr) minmax(220px, 1.45fr);
}
.ecrm-daily-simple-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.ecrm-daily-simple-actions .crm-button,
.ecrm-daily-simple-actions .crm-btn {
    min-height: 42px;
}
@media (max-width: 700px) {
    .ecrm-daily-simple-card {
        padding: 12px !important;
    }
    .ecrm-daily-simple-card .crm-card-title {
        font-size: 18px !important;
        margin-bottom: 10px;
    }
    .ecrm-daily-worker-field small {
        display: none !important;
    }
    .ecrm-work-entry-list {
        gap: 10px !important;
    }
    .ecrm-work-entry-simple {
        padding: 10px !important;
        border-radius: 14px !important;
    }
    .ecrm-work-entry-head {
        margin-bottom: 8px !important;
        gap: 8px;
    }
    .ecrm-work-entry-head strong {
        font-size: 13px !important;
    }
    .ecrm-work-entry-head .crm-btn {
        min-height: 30px !important;
        padding: 6px 9px !important;
        font-size: 11px !important;
    }
    .ecrm-work-entry-simple-grid.crm-grid,
    .ecrm-work-entry-simple-grid.crm-grid-5 {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .ecrm-work-entry-simple-grid .crm-field {
        gap: 3px !important;
        margin: 0 !important;
    }
    .ecrm-work-entry-simple-grid .crm-field label,
    .ecrm-work-extra-grid .crm-field label,
    .ecrm-material-row .crm-field label {
        font-size: 10.5px !important;
        line-height: 1.1 !important;
    }
    .ecrm-work-entry-simple-grid input,
    .ecrm-work-entry-simple-grid select,
    .ecrm-work-extra-grid input,
    .ecrm-work-extra-grid textarea,
    .ecrm-material-row input {
        min-height: 36px !important;
        padding: 7px 8px !important;
        font-size: 12px !important;
        border-radius: 10px !important;
    }
    .ecrm-work-entry-simple-grid .crm-field:nth-child(1),
    .ecrm-work-entry-simple-grid .crm-field:nth-child(2),
    .ecrm-work-entry-simple-grid .crm-field:nth-child(3) {
        grid-column: 1 / -1;
    }
    .ecrm-work-entry-simple-grid .ecrm-work-date-field {
        grid-column: 2;
    }
    .ecrm-work-more-details {
        margin-top: 8px;
    }
    .ecrm-work-more-details > summary,
    .ecrm-material-details > summary {
        min-height: 34px;
        padding: 8px 10px !important;
        font-size: 12px !important;
        border-radius: 10px !important;
    }
    .ecrm-work-more-details > summary span,
    .ecrm-material-details > summary span {
        display: none !important;
    }
    .ecrm-work-more-body {
        padding: 9px !important;
        margin-top: 8px;
    }
    .ecrm-work-extra-grid.crm-grid,
    .ecrm-work-extra-grid.crm-grid-2,
    .ecrm-material-row.crm-grid,
    .ecrm-material-row.crm-grid-5 {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .ecrm-work-extra-grid .crm-field:nth-child(2),
    .ecrm-material-row .crm-field:nth-child(1),
    .ecrm-material-row .crm-field:nth-child(5) {
        grid-column: 1 / -1;
    }
    .ecrm-daily-simple-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ecrm-daily-simple-actions .crm-button,
    .ecrm-daily-simple-actions .crm-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px !important;
        font-size: 13px !important;
    }
}

/* v2.0.79 - allow overwork daily logs */
.ecrm-overwork-warning {
    display: block;
    margin-top: 6px;
    color: #d97706;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
}
.ecrm-overwork-warning[hidden] {
    display: none !important;
}


/* v2.0.80 - daily work warning placement and mobile quick dates */
.ecrm-mobile-quick-date {
    display: none;
}
.ecrm-form-overwork-warning {
    margin: 12px 0 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid rgba(217, 119, 6, .35);
}
@media (max-width: 767px) {
    .ecrm-mobile-quick-date {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 6px;
        margin: -2px 0 0;
        flex-wrap: wrap;
    }
    .ecrm-mobile-quick-date span {
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        line-height: 1;
        margin-right: 2px;
    }
    .ecrm-mobile-quick-date .crm-btn {
        min-height: 28px !important;
        padding: 5px 8px !important;
        border-radius: 999px !important;
        font-size: 11px !important;
        line-height: 1 !important;
    }
    .ecrm-form-overwork-warning {
        font-size: 11.5px;
        padding: 8px 10px;
        margin: 10px 0 8px;
    }
}


/* v2.0.81 - mobile quick date today + prevent iOS input zoom on quantity fields */
@media (max-width: 767px) {
    .ecrm-daily-log-form input[name="quantity_done[]"],
    .ecrm-daily-log-form input[type="number"] {
        font-size: 16px !important;
    }
}

/* v2.0.82 - Performance filter compact mobile layout */
@media (max-width: 760px) {
    .crm-app .crm-performance-filter {
        margin: 10px 0 12px !important;
        padding: 10px !important;
        gap: 8px !important;
        border-radius: 14px !important;
    }

    .crm-app .crm-performance-filter .crm-chart-presets {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .crm-app .crm-performance-filter .crm-chart-presets .crm-chip {
        min-height: 30px !important;
        padding: 0 6px !important;
        font-size: 11px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .crm-app .crm-performance-filter .crm-chart-dates {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        align-items: end !important;
    }

    .crm-app .crm-performance-filter .crm-chart-dates label {
        gap: 4px !important;
        font-size: 11px !important;
        line-height: 1.1 !important;
        min-width: 0 !important;
    }

    .crm-app .crm-performance-filter .crm-chart-dates input[type="date"] {
        min-height: 36px !important;
        height: 36px !important;
        padding: 7px 8px !important;
        font-size: 13px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .crm-app .crm-performance-filter .crm-chart-dates button,
    .crm-app .crm-performance-filter .crm-chart-dates .crm-btn,
    .crm-app .crm-performance-filter .crm-chart-dates .crm-button {
        grid-column: 1 / -1 !important;
        min-height: 36px !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        width: 100% !important;
    }

    .crm-app .crm-performance-mode-switch {
        margin-top: 8px !important;
        gap: 6px !important;
    }

    .crm-app .crm-performance-mode-switch .crm-chip {
        min-height: 31px !important;
        padding: 0 8px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 420px) {
    .crm-app .crm-performance-filter .crm-chart-presets {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .crm-app .crm-performance-filter .crm-chart-dates {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* v2.0.83 - Mobile sticky header and worker own daily logs access polish */
@media (max-width: 1000px) {
    .crm-sidebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 999 !important;
    }

    body.admin-bar .crm-sidebar {
        top: 46px !important;
    }

    .crm-app.crm-mobile-menu-open .crm-sidebar {
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* v2.0.84 – reliable mobile sticky header/sidebar */
@media (max-width: 1000px) {
    html:has(.crm-app),
    body:has(.crm-app),
    .crm-app,
    .crm-layout {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .crm-main,
    .crm-content,
    .crm-card,
    .crm-panel {
        overflow-y: visible !important;
    }

    .crm-sidebar {
        position: sticky !important;
        position: -webkit-sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        align-self: flex-start !important;
        width: 100% !important;
        transform: translateZ(0);
    }

    .crm-brand {
        position: relative !important;
        z-index: 10000 !important;
    }
}


/* v2.0.85 - hide WP admin bar and force reliable fixed mobile CRM header */
html {
    margin-top: 0 !important;
}
body.admin-bar {
    padding-top: 0 !important;
}
#wpadminbar {
    display: none !important;
}

@media (max-width: 1000px) {
    html,
    body {
        margin-top: 0 !important;
        padding-top: 0 !important;
        scroll-padding-top: 74px !important;
    }

    body.admin-bar .crm-sidebar,
    .crm-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 99999 !important;
        transform: none !important;
        max-height: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .crm-layout {
        padding-top: 68px !important;
        overflow: visible !important;
    }

    .crm-main {
        padding-top: 8px !important;
    }

    .crm-app.crm-mobile-menu-open .crm-sidebar {
        max-height: 100dvh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .crm-app.crm-mobile-menu-open .crm-menu {
        max-height: calc(100dvh - 76px) !important;
    }
}

/* v2.0.86 - remove duplicate first mobile daily logs card list; keep the lower mobile card view */
@media (max-width: 700px){
  .crm-daily-mobile-cards{display:none!important;}
}

/* v2.0.87 - CRM real-time notification bell */
.crm-realtime-wrap{position:relative;display:inline-flex;align-items:center;z-index:80}.crm-realtime-bell{width:38px;height:38px;border:1px solid var(--crm-border,#dfe3ea);border-radius:12px;background:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;position:relative;box-shadow:0 6px 18px rgba(15,23,42,.06)}.crm-realtime-bell:hover{background:#f8fafc}.crm-realtime-icon{font-size:17px;line-height:1}.crm-realtime-badge{display:none;position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#f97316;color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center}.crm-realtime-badge.is-visible{display:block}.crm-realtime-panel{display:none;position:absolute;right:0;top:calc(100% + 10px);width:min(360px,calc(100vw - 24px));max-height:430px;overflow:auto;background:#fff;border:1px solid var(--crm-border,#dfe3ea);border-radius:16px;box-shadow:0 18px 45px rgba(15,23,42,.18);z-index:999}.crm-realtime-wrap.is-open .crm-realtime-panel{display:block}.crm-realtime-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #eef2f7}.crm-realtime-head button{border:0;background:transparent;color:#f97316;font-size:12px;font-weight:700;cursor:pointer}.crm-realtime-list{padding:6px}.crm-realtime-item{display:block;text-decoration:none;color:#111827;padding:10px 11px;border-radius:12px;border:1px solid transparent}.crm-realtime-item:hover{background:#f8fafc;border-color:#eef2f7}.crm-realtime-item:not(.is-read){background:#fff7ed}.crm-realtime-item strong{display:block;font-size:13px;margin-bottom:3px}.crm-realtime-item span{display:block;font-size:12px;line-height:1.35;color:#475569}.crm-realtime-item em{display:block;font-size:11px;color:#94a3b8;font-style:normal;margin-top:4px}.crm-realtime-empty{padding:22px 14px;text-align:center;color:#64748b;font-size:13px}.crm-realtime-desktop{margin-left:auto;margin-right:8px}.crm-realtime-mobile{margin-right:4px}.crm-mobile-header-actions .crm-realtime-wrap{display:inline-flex}.crm-mobile-header-actions .crm-realtime-bell{width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.95)}.crm-card-section+.crm-card-section{border-top:1px solid #eef2f7;margin-top:18px;padding-top:18px}.crm-realtime-settings-block .crm-muted{margin-top:-4px;margin-bottom:14px;font-size:13px;color:#64748b}@media (max-width:767px){.crm-realtime-desktop{display:none}.crm-realtime-mobile .crm-realtime-panel{position:fixed;top:62px;right:10px;left:10px;width:auto;max-height:min(70vh,520px)}.crm-realtime-bell{width:36px;height:36px}.crm-realtime-head{padding:11px 12px}.crm-realtime-item{padding:9px 10px}.crm-realtime-settings-block .crm-muted{font-size:12px;line-height:1.45;text-align:justify}}@media (min-width:768px){.crm-realtime-mobile{display:none!important}}


/* v2.0.88: egységes mobil értesítés ikon + olvasatlan belépéskori lista finomítás */
.crm-mobile-header-actions .crm-realtime-bell{
    background:var(--crm-primary,#f2a31a)!important;
    color:#fff!important;
    border-color:var(--crm-primary,#f2a31a)!important;
    box-shadow:none!important;
}
.crm-mobile-header-actions .crm-realtime-bell:hover{
    background:var(--crm-primary,#f2a31a)!important;
}
.crm-mobile-header-actions .crm-realtime-icon{filter:none;font-size:16px}
.crm-mobile-header-actions .crm-realtime-badge{background:#d83737;color:#fff;border:2px solid #fff;top:-7px;right:-7px}


/* v2.0.89 - realtime notification polish: graphite mobile bell + bottom toast */
.crm-mobile-header-actions .crm-realtime-bell{
    background:#2f343a!important;
    color:#fff!important;
    border-color:#2f343a!important;
    box-shadow:none!important;
}
.crm-mobile-header-actions .crm-realtime-bell:hover,
.crm-mobile-header-actions .crm-realtime-bell:focus{
    background:#2f343a!important;
    border-color:#2f343a!important;
    color:#fff!important;
}
.crm-realtime-toast-host{
    position:fixed;
    left:16px;
    right:16px;
    bottom:18px;
    z-index:99999;
    display:flex;
    flex-direction:column;
    gap:10px;
    pointer-events:none;
}
.crm-realtime-toast{
    display:block;
    max-width:520px;
    margin-left:auto;
    margin-right:auto;
    width:100%;
    transform:translateY(18px);
    opacity:0;
    pointer-events:auto;
    text-decoration:none;
    color:#fff!important;
    background:#2f343a;
    border:1px solid rgba(255,255,255,.12);
    border-radius:16px;
    box-shadow:0 18px 45px rgba(15,23,42,.28);
    padding:13px 15px;
    transition:opacity .22s ease, transform .22s ease;
}
.crm-realtime-toast.is-visible{opacity:1;transform:translateY(0)}
.crm-realtime-toast strong{display:block;font-size:13px;line-height:1.25;margin-bottom:4px;color:#fff}
.crm-realtime-toast span{display:block;font-size:12px;line-height:1.35;color:rgba(255,255,255,.86)}
@media (min-width:768px){.crm-realtime-toast-host{left:auto;right:22px;bottom:22px;width:420px}.crm-realtime-toast{max-width:420px}}


/* v2.0.90 - realtime toast desktop/mobile sizing fix */
.crm-realtime-toast-host{
    box-sizing:border-box!important;
    left:16px!important;
    right:16px!important;
    width:auto!important;
    max-width:calc(100vw - 32px)!important;
}
.crm-realtime-toast{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
}
@media (max-width:767px){
    .crm-realtime-toast-host{
        left:12px!important;
        right:12px!important;
        bottom:14px!important;
        max-width:calc(100vw - 24px)!important;
        align-items:stretch!important;
    }
    .crm-realtime-toast{
        margin-left:0!important;
        margin-right:0!important;
        border-radius:14px!important;
        padding:12px 13px!important;
    }
}
@media (min-width:768px){
    .crm-realtime-toast-host{
        left:auto!important;
        right:24px!important;
        bottom:24px!important;
        width:420px!important;
        max-width:420px!important;
        align-items:stretch!important;
    }
    .crm-realtime-toast{
        max-width:420px!important;
    }
}


/* v2.0.91 - notification actions */
.crm-realtime-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.crm-realtime-head .crm-realtime-delete-btn{color:#2f343a!important}.crm-realtime-head .crm-realtime-delete-btn:hover{text-decoration:underline}@media (max-width:767px){.crm-realtime-head{align-items:flex-start}.crm-realtime-actions{gap:6px}.crm-realtime-head button{font-size:11px}}

/* v2.0.92 - notification actor self-skip */

/* v2.0.93 – ügyfélportál pótmunka mobil kártyák és értesítés anchor célpont */
.crm-client-extra-table-wrap,
.crm-client-extra-table,
.crm-client-extra-table tbody,
.crm-client-extra-table tr,
.crm-client-extra-table td {
    max-width: 100%;
    box-sizing: border-box;
}

.crm-client-extra-row {
    scroll-margin-top: 92px;
}

.crm-client-extra-row:target {
    outline: 2px solid var(--crm-accent, #f97316);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .12);
}

@media (max-width: 760px) {
    .crm-client-extra-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        padding: 0;
    }

    .crm-client-extra-table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: auto;
    }

    .crm-client-extra-table tbody tr,
    .crm-client-extra-table .crm-client-extra-row {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .crm-client-extra-table td,
    .crm-client-extra-table td:first-child {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
        grid-template-columns: minmax(82px, 30%) minmax(0, 1fr);
        column-gap: 10px;
        overflow-wrap: anywhere;
    }

    .crm-client-extra-table td > *,
    .crm-client-extra-table td strong,
    .crm-client-extra-table td small,
    .crm-client-extra-table .crm-badge,
    .crm-client-extra-table .crm-client-extra-actions {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .crm-client-extra-table .crm-client-extra-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .crm-client-extra-table .crm-client-extra-actions .crm-inline-form,
    .crm-client-extra-table .crm-client-extra-actions .crm-btn {
        width: 100%;
    }
}

/* v2.0.94 – ügyfélportál projekt idővonal */
.crm-client-timeline-panel {
    overflow: hidden;
}
.crm-client-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}
.crm-client-timeline-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: stretch;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.crm-client-timeline-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    background: #eef2f7;
    color: #111827;
    min-height: 72px;
    font-weight: 700;
}
.crm-client-timeline-date span {
    font-size: 13px;
    line-height: 1;
    opacity: .8;
}
.crm-client-timeline-date strong {
    font-size: 22px;
    line-height: 1;
}
.crm-client-timeline-body {
    padding: 12px 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.crm-client-timeline-title {
    font-weight: 800;
    color: #111827;
    text-decoration: none;
    line-height: 1.25;
}
.crm-client-timeline-title:hover {
    text-decoration: underline;
}
.crm-client-timeline-body small,
.crm-client-timeline-body em {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    font-style: normal;
}
.crm-client-timeline-success .crm-client-timeline-date { background: #dcfce7; color: #166534; }
.crm-client-timeline-warning .crm-client-timeline-date { background: #fef3c7; color: #92400e; }
.crm-client-timeline-danger .crm-client-timeline-date { background: #fee2e2; color: #991b1b; }
.crm-client-timeline-info .crm-client-timeline-date { background: #e0f2fe; color: #075985; }
#client-project-timeline:target,
.crm-client-timeline-item:target {
    outline: 3px solid rgba(249, 115, 22, .35);
    outline-offset: 4px;
}
@media (max-width: 767px) {
    .crm-client-timeline-panel .crm-section-head p { display: none; }
    .crm-client-timeline { gap: 10px; }
    .crm-client-timeline-item {
        grid-template-columns: 50px minmax(0, 1fr);
        border-radius: 14px;
    }
    .crm-client-timeline-date { min-height: 64px; }
    .crm-client-timeline-date span { font-size: 12px; }
    .crm-client-timeline-date strong { font-size: 20px; }
    .crm-client-timeline-body { padding: 10px 12px; }
    .crm-client-timeline-title { font-size: 14px; }
    .crm-client-timeline-body small,
    .crm-client-timeline-body em { font-size: 11px; }
}

/* v2.0.95 – ügyfél projekt idővonal URL fatal fix */
/* v2.0.96 – ügyfél idővonal limit + projekt beállítás */


/* v2.0.96 - ügyfél projekt idővonal limit és projekt szintű láthatóság */
.crm-client-timeline-extra.is-hidden { display: none !important; }
.crm-client-timeline-show-all { margin-top: 12px; width: 100%; justify-content: center; }
.crm-client-timeline-settings-panel { margin: 18px 0; }
.crm-client-timeline-settings-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) {
    .crm-client-timeline-settings-list { grid-template-columns: 1fr; }
    .crm-client-timeline-show-all { min-height: 42px; }
}

/* Dashboard card limit selectors */
.crm-section-head-with-control {
    align-items: flex-start;
    gap: 12px;
}
.crm-mini-limit-form {
    margin-left: auto;
    flex: 0 0 auto;
}
.crm-mini-limit-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--crm-muted, #6b7280);
    white-space: nowrap;
}
.crm-mini-limit-form select {
    min-width: 64px;
    padding: 7px 28px 7px 10px;
    border: 1px solid var(--crm-border, #d1d5db);
    border-radius: 10px;
    background: #fff;
}
.crm-table-actions,
.crm-card-actions,
.crm-daily-log-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.crm-inline-form {
    display: inline-flex;
    margin: 0;
}
.crm-btn-small {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
}
@media (max-width: 767px) {
    .crm-section-head-with-control {
        flex-direction: row;
        align-items: flex-start;
    }
    .crm-mini-limit-form label span {
        display: none;
    }
}


/* Project progress + schedule indicators */
.crm-project-progress-stack {
    display: grid;
    gap: 8px;
    min-width: 170px;
}

.crm-project-progress-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.crm-project-progress-row small,
.crm-project-detail-progress-stat small {
    color: var(--crm-muted);
    font-weight: 700;
    white-space: nowrap;
}

.crm-time-progress {
    height: 8px;
}

.crm-time-progress-ok .crm-progress-bar {
    background: #16a34a;
}

.crm-time-progress-warning .crm-progress-bar {
    background: #f59e0b;
}

.crm-time-progress-danger .crm-progress-bar {
    background: #dc2626;
}

.crm-time-progress-neutral .crm-progress-bar {
    background: #94a3b8;
}

.crm-project-detail-progress-stat {
    gap: 8px;
}

.crm-project-detail-progress-stat .crm-progress {
    margin-top: 6px;
}


/* Projekt nézetben az időbeli előrehaladás sávja legyen ugyanolyan vastag, mint a készültségi sáv. */
.crm-project-detail-progress-stat .crm-time-progress {
    height: 12px;
}

/* Projekt kockázati figyelő */
.crm-risk-projects-panel .crm-section-head {
    align-items: flex-start;
}

.crm-risk-project-list {
    gap: 10px;
}

.crm-risk-project-item {
    align-items: center;
    gap: 16px;
}

.crm-risk-project-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 150px;
}

.crm-risk-project-meta small,
.crm-risk-list-message {
    color: var(--crm-muted);
    font-weight: 700;
}

.crm-risk-list-message {
    display: block;
    margin-top: 4px;
    max-width: 260px;
    line-height: 1.35;
}

.crm-project-risk-summary {
    border-left: 4px solid var(--crm-primary);
    background: var(--crm-surface);
    border-top: 1px solid var(--crm-border);
    border-right: 1px solid var(--crm-border);
    border-bottom: 1px solid var(--crm-border);
    border-radius: var(--crm-radius-lg);
    box-shadow: var(--crm-shadow);
    padding: var(--crm-card-padding, 22px);
    overflow: hidden;
}

.crm-project-risk-summary h3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.crm-project-risk-summary p {
    margin: 0 0 6px;
    font-weight: 800;
}

.crm-project-risk-summary small {
    color: var(--crm-muted);
    font-weight: 700;
}

.crm-project-risk-critical,
.crm-project-risk-expired {
    border-left-color: #dc2626;
    background: #fff5f5;
}

.crm-project-risk-delayed,
.crm-project-risk-watch {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.crm-project-risk-ok {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

@media (max-width: 767px) {
    .crm-risk-project-item,
    .crm-risk-project-meta {
        align-items: flex-start;
    }
    .crm-risk-project-meta {
        min-width: 0;
    }
}

/* Projekt riport v1 */
.crm-report-toolbar { margin-bottom: 18px; }
.crm-project-print-report {
    max-width: 980px;
    margin: 0 auto 32px;
    background: #fff;
    color: #111827;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
    border: 1px solid rgba(148, 163, 184, .22);
    overflow: hidden;
}
.crm-report-cover {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 70%);
}
.crm-report-logo { max-height: 54px; max-width: 180px; object-fit: contain; margin-bottom: 16px; }
.crm-report-kicker { margin: 0 0 8px; color: #64748b; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.crm-report-cover h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.12; color: #0f172a; }
.crm-report-cover p { margin: 0; color: #475569; }
.crm-report-health { min-width: 190px; align-self: flex-start; border-radius: 18px; padding: 18px; background: #f1f5f9; border: 1px solid #e2e8f0; }
.crm-report-health span { display: block; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 6px; }
.crm-report-health strong { display: block; color: #0f172a; font-size: 22px; }
.crm-report-health-critical, .crm-report-health-expired { background: #fef2f2; border-color: #fecaca; }
.crm-report-health-delayed { background: #fff7ed; border-color: #fed7aa; }
.crm-report-health-watch { background: #fefce8; border-color: #fde68a; }
.crm-report-health-ok { background: #f0fdf4; border-color: #bbf7d0; }
.crm-report-section { padding: 26px 34px; border-bottom: 1px solid #eef2f7; break-inside: avoid; page-break-inside: avoid; }
.crm-report-section h2 { margin: 0 0 16px; font-size: 20px; color: #0f172a; }
.crm-report-description { margin: 16px 0 0; color: #475569; }
.crm-report-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.crm-report-stat-grid.crm-report-stat-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); margin-bottom: 16px; }
.crm-report-stat-grid > div { border: 1px solid #e5e7eb; border-radius: 16px; padding: 14px 16px; background: #f8fafc; }
.crm-report-stat-grid span { display: block; font-size: 12px; color: #64748b; margin-bottom: 5px; }
.crm-report-stat-grid strong { display: block; font-size: 16px; color: #0f172a; }
.crm-report-progress-pair { display: grid; gap: 18px; }
.crm-report-line-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #0f172a; }
.crm-report-progress { height: 13px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.crm-report-progress > div { height: 100%; border-radius: inherit; background: #2563eb; }
.crm-report-timebar > div { background: #0f766e; }
.crm-report-risk-box { margin-top: 16px; border-radius: 16px; border: 1px solid #fed7aa; background: #fff7ed; padding: 14px 16px; color: #7c2d12; }
.crm-report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.crm-report-table th, .crm-report-table td { border-bottom: 1px solid #e5e7eb; padding: 10px 9px; text-align: left; vertical-align: top; }
.crm-report-table th { color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
.crm-report-table small { display: block; color: #64748b; margin-top: 5px; }
.crm-report-total { margin-bottom: 14px; border-radius: 16px; padding: 14px 16px; background: #f8fafc; border: 1px solid #e5e7eb; }
.crm-report-footer { padding: 20px 34px; color: #64748b; font-size: 12px; text-align: center; }
.crm-report-section-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media print {
    html, body { background: #fff !important; color: #111827 !important; }
    .crm-sidebar, .crm-topbar, .crm-report-toolbar, .no-print, #wpadminbar { display: none !important; }
    .crm-layout, .crm-main, .crm-app { display: block !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
    .crm-project-print-report { max-width: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
    .crm-report-cover { padding: 16mm 14mm 10mm !important; }
    .crm-report-section { padding: 8mm 14mm !important; }
    .crm-report-footer { padding: 8mm 14mm !important; }
    .crm-report-cover h1 { font-size: 24pt !important; }
    .crm-report-section h2 { font-size: 15pt !important; }
    .crm-report-stat-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .crm-report-table th, .crm-report-table td { padding: 6px 7px !important; }
    @page { size: A4; margin: 12mm; }
}

@media (max-width: 760px) {
    .crm-report-cover { flex-direction: column; padding: 22px; }
    .crm-report-section { padding: 22px; }
    .crm-report-stat-grid { grid-template-columns: 1fr; }
    .crm-project-print-report { border-radius: 18px; }
}

/* Projekt riport finomítás v1.1 */
.crm-report-logo-preview {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 220px;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}
.crm-report-logo-preview img {
    max-width: 190px;
    max-height: 54px;
    object-fit: contain;
}
.crm-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: #475569;
}
.crm-project-print-report {
    font-variant-numeric: tabular-nums;
}
.crm-report-cover {
    position: relative;
}
.crm-report-cover::after {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #0f766e, #e2e8f0);
}
.crm-report-logo {
    display: block;
    background: transparent;
}
.crm-report-health-client {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.crm-report-client-note {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
}
.crm-report-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}
.crm-report-section h2::before {
    content: "";
    width: 9px;
    height: 22px;
    border-radius: 999px;
    background: #2563eb;
    display: inline-block;
}
.crm-report-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
}
.crm-report-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}
.crm-report-footer {
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}
.crm-client-report .crm-report-risk-box,
.crm-client-report .crm-report-internal-only {
    display: none !important;
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    html, body {
        width: 210mm;
        min-height: 297mm;
    }
    .crm-project-print-report {
        width: 100% !important;
        overflow: visible !important;
        font-size: 10.5pt !important;
        line-height: 1.35 !important;
    }
    .crm-report-cover {
        min-height: 46mm;
        align-items: flex-start !important;
        break-after: avoid;
        page-break-after: avoid;
    }
    .crm-report-cover::after {
        left: 14mm !important;
        right: 14mm !important;
    }
    .crm-report-logo {
        max-height: 17mm !important;
        max-width: 48mm !important;
        margin-bottom: 5mm !important;
    }
    .crm-report-kicker {
        font-size: 8.5pt !important;
        margin-bottom: 2mm !important;
    }
    .crm-report-cover p {
        font-size: 9.5pt !important;
    }
    .crm-report-health {
        min-width: 44mm !important;
        padding: 5mm !important;
        border-radius: 5mm !important;
    }
    .crm-report-health span {
        font-size: 8pt !important;
    }
    .crm-report-health strong {
        font-size: 13pt !important;
    }
    .crm-report-client-note {
        padding-top: 5mm !important;
        padding-bottom: 5mm !important;
    }
    .crm-report-section {
        break-inside: avoid;
        page-break-inside: avoid;
        border-bottom-color: #e5e7eb !important;
    }
    .crm-report-section h2 {
        margin-bottom: 4mm !important;
        break-after: avoid;
        page-break-after: avoid;
    }
    .crm-report-section h2::before {
        height: 16pt !important;
    }
    .crm-report-stat-grid > div,
    .crm-report-total,
    .crm-report-risk-box {
        border-radius: 4mm !important;
        padding: 3.5mm 4mm !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .crm-report-progress {
        height: 4mm !important;
    }
    .crm-report-table {
        font-size: 9.2pt !important;
    }
    .crm-report-table thead {
        display: table-header-group;
    }
    .crm-report-table tfoot {
        display: table-footer-group;
    }
    .crm-report-table tr,
    .crm-report-table td,
    .crm-report-table th {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .crm-report-footer {
        margin-top: 4mm !important;
        font-size: 8.5pt !important;
    }
}

/* Projekt riport v1.1 finomítások */
.crm-report-brand-block {
    min-width: 0;
}
.crm-report-meta-block {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, auto);
    gap: 14px;
    align-items: start;
    max-width: 520px;
}
.crm-report-meta-list {
    display: grid;
    gap: 8px;
}
.crm-report-meta-list > div {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 12px;
    background: #f8fafc;
}
.crm-report-meta-list span {
    display: block;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    margin-bottom: 3px;
}
.crm-report-meta-list strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.25;
}
.crm-report-executive-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}
.crm-report-executive-summary p {
    margin: 0;
    color: #334155;
    line-height: 1.65;
    font-size: 15px;
}
.crm-report-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.crm-report-footer span {
    display: inline-flex;
}

@media print {
    .crm-report-meta-block {
        grid-template-columns: 1fr 44mm !important;
        max-width: 96mm !important;
        gap: 4mm !important;
    }
    .crm-report-meta-list {
        gap: 2mm !important;
    }
    .crm-report-meta-list > div {
        border-radius: 3mm !important;
        padding: 2.5mm 3mm !important;
    }
    .crm-report-meta-list span {
        font-size: 7.5pt !important;
    }
    .crm-report-meta-list strong {
        font-size: 8.5pt !important;
    }
    .crm-report-executive-summary p {
        font-size: 10pt !important;
        line-height: 1.45 !important;
    }
    .crm-report-footer {
        display: flex !important;
        justify-content: space-between !important;
        gap: 5mm !important;
    }
}


/* FM CRM v2.0.102 - riport fejléc/logó megjelenítés fix
   A globális CRM szabály elrejti a header elemeket, ezért a riport fejlécét
   célzottan, nagyobb specifitással állítjuk vissza. */
body:has(.crm-app) .crm-project-print-report header.crm-report-cover,
body:has(.crm-app) article.crm-project-print-report header.crm-report-cover {
    display: flex !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 34px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 70%) !important;
}

body:has(.crm-app) .crm-project-print-report .crm-report-logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 54px !important;
    max-width: 180px !important;
    object-fit: contain !important;
}

@media print {
    body:has(.crm-app) .crm-project-print-report header.crm-report-cover,
    body:has(.crm-app) article.crm-project-print-report header.crm-report-cover {
        display: flex !important;
        padding: 16mm 14mm 10mm !important;
    }
    body:has(.crm-app) .crm-project-print-report .crm-report-logo {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: 17mm !important;
        max-width: 48mm !important;
    }
}


/* FM CRM v2.0.102 - nyomtatási riport fejléc kompakt vízszintes elrendezés */
@media print {
    body:has(.crm-app) .crm-project-print-report header.crm-report-cover,
    body:has(.crm-app) article.crm-project-print-report header.crm-report-cover {
        display: grid !important;
        grid-template-columns: 48mm 1fr !important;
        align-items: center !important;
        gap: 8mm !important;
        padding: 8mm 14mm 7mm !important;
        min-height: auto !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-brand-block {
        display: contents !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-logo {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: 17mm !important;
        max-width: 48mm !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        align-self: center !important;
        justify-self: start !important;
        object-fit: contain !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-kicker {
        grid-column: 2 !important;
        margin: 0 0 1.5mm !important;
        font-size: 7.5pt !important;
        line-height: 1.15 !important;
    }

    body:has(.crm-app) .crm-project-print-report header.crm-report-cover h1 {
        grid-column: 2 !important;
        margin: 0 0 2.5mm !important;
        font-size: 17pt !important;
        line-height: 1.12 !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-meta-block {
        grid-column: 2 !important;
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: stretch !important;
        gap: 3mm !important;
        max-width: none !important;
        width: 100% !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-meta-list {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 2mm !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-meta-list > div {
        padding: 1.8mm 2.2mm !important;
        border-radius: 2.5mm !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-meta-list span {
        font-size: 6.8pt !important;
        margin-bottom: .8mm !important;
        line-height: 1.1 !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-meta-list strong {
        font-size: 7.8pt !important;
        line-height: 1.15 !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-health {
        min-width: 34mm !important;
        padding: 2mm 2.5mm !important;
        border-radius: 2.5mm !important;
        align-self: stretch !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-health span {
        font-size: 6.8pt !important;
        margin-bottom: .8mm !important;
        line-height: 1.1 !important;
    }

    body:has(.crm-app) .crm-project-print-report .crm-report-health strong {
        font-size: 8.5pt !important;
        line-height: 1.18 !important;
    }
}

/* FM CRM v2.0.105 - Központi mértékegység-normalizálás hotfix */
/* FM CRM v2.0.103 - Projekt teljesítési kimutatás nyomtatási nézet */
.crm-performance-print-report {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    overflow: hidden;
    margin-top: 18px;
}

.crm-performance-print-header {
    display: flex !important;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 72%);
}

.crm-performance-print-title h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.16;
    color: #111827;
}

.crm-performance-print-meta {
    display: grid;
    gap: 7px;
    min-width: 280px;
    font-size: 13px;
    color: #374151;
}

.crm-performance-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 28px 4px;
}

.crm-performance-summary-grid > div {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 13px 14px;
    background: #f9fafb;
}

.crm-performance-summary-grid span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
}

.crm-performance-summary-grid strong {
    display: block;
    font-size: 16px;
    color: #111827;
}

.crm-performance-print-section {
    padding: 22px 28px;
    border-top: 1px solid #eef2f7;
    break-inside: avoid;
    page-break-inside: avoid;
}

.crm-performance-print-section h2 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #111827;
}

.crm-performance-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #111827;
    background: #fff;
}

.crm-performance-print-table th,
.crm-performance-print-table td {
    border: 1px solid #dbe3ef;
    padding: 8px 9px;
    vertical-align: top;
    text-align: left;
}

.crm-performance-print-table th {
    background: #f1f5f9;
    color: #111827;
    font-weight: 700;
}

.crm-performance-print-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.crm-print-mini-progress {
    height: 8px;
    width: 100%;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.crm-print-mini-progress span {
    display: block;
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
}

.crm-performance-print-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 28px 18px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body:has(.crm-performance-print-report) {
        background: #fff !important;
    }

    body:has(.crm-performance-print-report) .crm-sidebar,
    body:has(.crm-performance-print-report) .crm-topbar,
    body:has(.crm-performance-print-report) .crm-no-print,
    body:has(.crm-performance-print-report) .crm-breadcrumb,
    body:has(.crm-performance-print-report) .crm-actions,
    body:has(.crm-performance-print-report) .crm-filter-bar {
        display: none !important;
    }

    body:has(.crm-performance-print-report) .crm-layout,
    body:has(.crm-performance-print-report) .crm-main {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .crm-performance-print-report {
        display: block !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        overflow: visible !important;
        color: #111827 !important;
    }

    .crm-performance-print-header {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 0 0 8px !important;
        border-bottom: 1px solid #cbd5e1 !important;
        background: #fff !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .crm-performance-print-title h1 {
        font-size: 17px !important;
        line-height: 1.18 !important;
        margin: 0 !important;
    }

    .crm-performance-print-meta {
        min-width: 220px !important;
        gap: 2px !important;
        font-size: 9.5px !important;
        line-height: 1.25 !important;
        text-align: right !important;
    }

    .crm-performance-summary-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
        padding: 8px 0 2px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .crm-performance-summary-grid > div {
        border-radius: 0 !important;
        padding: 6px 7px !important;
        background: #fff !important;
    }

    .crm-performance-summary-grid span {
        font-size: 8.5px !important;
        margin-bottom: 1px !important;
    }

    .crm-performance-summary-grid strong {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    .crm-performance-print-section {
        padding: 8px 0 0 !important;
        border-top: 0 !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .crm-performance-print-section h2 {
        font-size: 12px !important;
        margin: 0 0 4px !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

    .crm-performance-print-table {
        font-size: 8.8px !important;
        line-height: 1.2 !important;
        page-break-inside: auto !important;
    }

    .crm-performance-print-table th,
    .crm-performance-print-table td {
        padding: 3px 4px !important;
        border-color: #cbd5e1 !important;
    }

    .crm-performance-print-table th {
        background: #eef2f7 !important;
    }

    .crm-performance-print-table tr {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .crm-print-mini-progress {
        height: 5px !important;
        margin-bottom: 1px !important;
        background: #e5e7eb !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .crm-print-mini-progress span {
        background: #2563eb !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .crm-performance-detail-table {
        font-size: 8px !important;
    }

    .crm-performance-print-footer {
        padding: 7px 0 0 !important;
        font-size: 8.5px !important;
        border-top: 1px solid #cbd5e1 !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}

/* FM CRM v2.0.105 - Projekt nézet mobil műveletmenü */
.crm-project-mobile-actions {
    display: none;
}

.crm-project-action-menu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.crm-project-action-menu summary::-webkit-details-marker {
    display: none;
}

@media (max-width: 767px) {
    .crm-project-desktop-actions {
        display: none !important;
    }

    .crm-project-mobile-actions {
        display: flex !important;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        margin-top: 12px;
        position: relative;
        z-index: 30;
    }

    .crm-project-mobile-actions > .crm-btn,
    .crm-project-mobile-actions > .crm-project-action-menu > summary {
        flex: 1 1 0;
        min-height: 44px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
        border-radius: 12px;
    }

    .crm-project-mobile-actions .crm-project-mobile-primary {
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
    }

    .crm-project-action-menu {
        flex: 1 1 0;
        position: relative;
    }

    .crm-project-action-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        min-width: min(86vw, 320px);
        display: none;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
        z-index: 80;
    }

    .crm-project-action-menu[open] .crm-project-action-menu-panel {
        display: flex;
    }

    .crm-project-action-menu[open] summary {
        background: #eef2ff;
        border-color: #c7d2fe;
        color: #1e40af;
    }

    .crm-project-action-menu-panel .crm-btn,
    .crm-project-action-menu-panel .crm-button,
    .crm-project-action-menu-panel .crm-inline-form,
    .crm-project-action-menu-panel .crm-inline-form button {
        width: 100% !important;
        justify-content: center;
        text-align: center;
        margin: 0 !important;
    }

    .crm-project-action-menu-panel .crm-inline-form {
        display: block !important;
    }

    .crm-project-action-menu-panel .crm-btn-danger {
        margin-top: 4px !important;
    }

    .crm-section-head:has(.crm-project-mobile-actions) {
        align-items: flex-start;
    }
}


/* v2.0.106 mobile action menu */
@media (max-width: 767px){
  .crm-project-mobile-actions .crm-project-action-menu > summary.crm-btn{
    background:#374151!important;
    border-color:#374151!important;
    color:#fff!important;
    min-height:44px;
  }
}
.crm-project-action-menu[open] > summary::after{content:" ▲";}
.crm-project-action-menu:not([open]) > summary::after{content:" ▼";}


/* FM CRM v2.0.107 - Mobil projekt műveletmenü finomítás */
@media (max-width: 767px) {
    .crm-project-mobile-actions {
        width: 100% !important;
        display: flex !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .crm-project-mobile-actions > .crm-project-mobile-primary {
        flex: 0 0 44% !important;
        min-width: 0 !important;
        min-height: 46px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 14px !important;
        border-radius: 12px !important;
        border: 1px solid #f59e0b !important;
        background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%) !important;
        color: #111827 !important;
        font-weight: 800 !important;
        box-shadow: 0 10px 22px rgba(245, 158, 11, 0.24) !important;
        white-space: nowrap !important;
    }

    .crm-project-mobile-actions > .crm-project-mobile-primary:hover,
    .crm-project-mobile-actions > .crm-project-mobile-primary:focus {
        background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
        color: #111827 !important;
    }

    .crm-project-mobile-actions > .crm-project-action-menu {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        position: relative !important;
    }

    .crm-project-mobile-actions > .crm-project-action-menu > summary.crm-btn {
        width: 100% !important;
        min-height: 46px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 14px !important;
        border-radius: 12px !important;
        border: 1px solid #374151 !important;
        background: #374151 !important;
        color: #fff !important;
        font-weight: 800 !important;
        box-shadow: 0 10px 22px rgba(55, 65, 81, 0.22) !important;
        white-space: nowrap !important;
    }

    .crm-project-mobile-actions > .crm-project-action-menu > summary.crm-btn:hover,
    .crm-project-mobile-actions > .crm-project-action-menu > summary.crm-btn:focus,
    .crm-project-mobile-actions > .crm-project-action-menu[open] > summary.crm-btn {
        background: #1f2937 !important;
        border-color: #1f2937 !important;
        color: #fff !important;
    }

    .crm-project-action-menu > summary.crm-btn::after {
        content: " ▼" !important;
        margin-left: 6px !important;
        font-size: 0.9em !important;
    }

    .crm-project-action-menu[open] > summary.crm-btn::after {
        content: " ▲" !important;
    }
}

/* v2.1.0-experimental - Adminból kapcsolható blurred / liquid design mód */
.crm-design-bg-preview {
    width: 100%;
    min-height: 120px;
    margin-top: 10px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(148, 163, 184, .35);
    box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

.crm-design-preview-card {
    margin: 18px 0 22px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .95), rgba(245, 158, 11, .65));
}

.crm-design-preview-surface {
    max-width: 420px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.38);
    background: rgba(255,255,255,.28);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    color: #fff;
    box-shadow: 0 20px 44px rgba(15,23,42,.22);
}

.crm-design-preview-surface strong,
.crm-design-preview-surface span {
    display: block;
}

.crm-design-preview-surface span {
    margin-top: 4px;
    opacity: .88;
}

.crm-app.crm-design-liquid {
    --crm-liquid-panel-bg: rgba(255,255,255,var(--crm-liquid-card));
    --crm-liquid-border: rgba(255,255,255,.34);
    --crm-liquid-text: #111827;
    position: relative;
    min-height: 100vh;
    background: var(--crm-liquid-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--crm-liquid-text);
    isolation: isolate;
}

.crm-app.crm-design-liquid::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--crm-liquid-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.crm-app.crm-design-liquid::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 12%, rgba(255,255,255,.28), transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(245,158,11,.24), transparent 24%),
        rgba(15, 23, 42, var(--crm-liquid-overlay));
    pointer-events: none;
}

.crm-app.crm-design-liquid .crm-layout,
.crm-app.crm-design-liquid .crm-main {
    background: transparent !important;
}

.crm-app.crm-design-liquid .crm-sidebar {
    background: rgba(15, 23, 42, .64) !important;
    border-right: 1px solid rgba(255,255,255,.16) !important;
    backdrop-filter: blur(calc(var(--crm-liquid-blur) + 4px)) saturate(145%);
    -webkit-backdrop-filter: blur(calc(var(--crm-liquid-blur) + 4px)) saturate(145%);
    box-shadow: 24px 0 60px rgba(15, 23, 42, .18);
}

.crm-app.crm-design-liquid .crm-topbar,
.crm-app.crm-design-liquid .crm-card,
.crm-app.crm-design-liquid .crm-panel,
.crm-app.crm-design-liquid .crm-module,
.crm-app.crm-design-liquid .crm-dashboard-card,
.crm-app.crm-design-liquid .crm-stat-card,
.crm-app.crm-design-liquid .crm-kpi-card,
.crm-app.crm-design-liquid .crm-project-card,
.crm-app.crm-design-liquid .crm-report-card,
.crm-app.crm-design-liquid .crm-modal,
.crm-app.crm-design-liquid .crm-table-wrap,
.crm-app.crm-design-liquid .crm-data-table,
.crm-app.crm-design-liquid form.crm-card,
.crm-app.crm-design-liquid .crm-project-status-card,
.crm-app.crm-design-liquid .crm-risk-card,
.crm-app.crm-design-liquid .crm-mobile-action-menu summary,
.crm-app.crm-design-liquid .crm-mobile-action-menu-content {
    border-color: var(--crm-liquid-border) !important;
    background: var(--crm-liquid-panel-bg) !important;
    border-radius: var(--crm-liquid-radius) !important;
    backdrop-filter: blur(var(--crm-liquid-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--crm-liquid-blur)) saturate(150%);
    box-shadow: 0 var(--crm-liquid-shadow) calc(var(--crm-liquid-shadow) * 2) rgba(15, 23, 42, .16) !important;
}

.crm-app.crm-design-liquid .crm-page-header,
.crm-app.crm-design-liquid .crm-breadcrumb,
.crm-app.crm-design-liquid .crm-back-link,
.crm-app.crm-design-liquid .crm-topbar-title h1,
.crm-app.crm-design-liquid .crm-page-header h2,
.crm-app.crm-design-liquid .crm-page-header p {
    color: #fff !important;
    text-shadow: 0 2px 14px rgba(15, 23, 42, .35);
}

.crm-app.crm-design-liquid .crm-card h1,
.crm-app.crm-design-liquid .crm-card h2,
.crm-app.crm-design-liquid .crm-card h3,
.crm-app.crm-design-liquid .crm-card strong,
.crm-app.crm-design-liquid .crm-panel h1,
.crm-app.crm-design-liquid .crm-panel h2,
.crm-app.crm-design-liquid .crm-panel h3,
.crm-app.crm-design-liquid .crm-module-title {
    color: #0f172a;
}

.crm-app.crm-design-liquid .crm-card p,
.crm-app.crm-design-liquid .crm-card small,
.crm-app.crm-design-liquid .crm-module-desc,
.crm-app.crm-design-liquid .crm-muted,
.crm-app.crm-design-liquid .crm-table-muted {
    color: rgba(15, 23, 42, .72) !important;
}

.crm-app.crm-design-liquid table,
.crm-app.crm-design-liquid thead,
.crm-app.crm-design-liquid tbody,
.crm-app.crm-design-liquid tr,
.crm-app.crm-design-liquid td,
.crm-app.crm-design-liquid th {
    background: transparent !important;
}

.crm-app.crm-design-liquid th {
    color: rgba(15, 23, 42, .72) !important;
}

.crm-app.crm-design-liquid tr {
    border-color: rgba(15, 23, 42, .08) !important;
}

.crm-app.crm-design-liquid input,
.crm-app.crm-design-liquid select,
.crm-app.crm-design-liquid textarea {
    background: rgba(255,255,255,.62) !important;
    border-color: rgba(255,255,255,.42) !important;
    border-radius: calc(var(--crm-liquid-radius) * .65) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 10px 24px rgba(15,23,42,.08);
}

.crm-app.crm-design-liquid .crm-button,
.crm-app.crm-design-liquid button.crm-button,
.crm-app.crm-design-liquid a.crm-button,
.crm-app.crm-design-liquid .crm-primary-button {
    background: var(--crm-liquid-accent) !important;
    border-color: rgba(255,255,255,.24) !important;
    color: #111827 !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .18) !important;
}

.crm-app.crm-design-liquid .crm-menu a.active,
.crm-app.crm-design-liquid .crm-menu a:hover {
    background: rgba(255,255,255,.18) !important;
    border-color: rgba(255,255,255,.24) !important;
}

.crm-app.crm-design-liquid .crm-alert {
    background: rgba(255,255,255,.78) !important;
    backdrop-filter: blur(var(--crm-liquid-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--crm-liquid-blur)) saturate(150%);
}

@media (max-width: 767px) {
    .crm-app.crm-design-liquid {
        background-attachment: scroll;
    }

    .crm-app.crm-design-liquid::before {
        background-attachment: scroll;
    }

    .crm-app.crm-design-liquid .crm-sidebar {
        backdrop-filter: blur(14px) saturate(140%);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
    }

    .crm-app.crm-design-liquid .crm-card,
    .crm-app.crm-design-liquid .crm-panel,
    .crm-app.crm-design-liquid .crm-module,
    .crm-app.crm-design-liquid .crm-topbar,
    .crm-app.crm-design-liquid .crm-table-wrap {
        backdrop-filter: blur(min(var(--crm-liquid-blur), 14px)) saturate(140%);
        -webkit-backdrop-filter: blur(min(var(--crm-liquid-blur), 14px)) saturate(140%);
    }
}

@media print {
    .crm-app.crm-design-liquid,
    .crm-app.crm-design-liquid::before,
    .crm-app.crm-design-liquid::after,
    .crm-app.crm-design-liquid .crm-card,
    .crm-app.crm-design-liquid .crm-panel,
    .crm-app.crm-design-liquid .crm-topbar,
    .crm-app.crm-design-liquid .crm-table-wrap {
        background: #fff !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* v2.1.1 - Design rendszer: dark mode + liquid kontraszt finomítás */
.crm-app.crm-design-dark {
    --crm-dark-bg: #0f172a;
    --crm-dark-surface: #111827;
    --crm-dark-card: #1e293b;
    --crm-dark-card-soft: #243449;
    --crm-dark-border: rgba(148, 163, 184, .24);
    --crm-dark-text: #f8fafc;
    --crm-dark-muted: #cbd5e1;
    --crm-dark-soft: #94a3b8;
    --crm-dark-accent: #f59e0b;
    background: radial-gradient(circle at 18% 8%, rgba(245,158,11,.16), transparent 28%), var(--crm-dark-bg) !important;
    color: var(--crm-dark-text) !important;
    min-height: 100vh;
}

.crm-app.crm-design-dark .crm-layout,
.crm-app.crm-design-dark .crm-main {
    background: transparent !important;
    color: var(--crm-dark-text) !important;
}

.crm-app.crm-design-dark .crm-sidebar {
    background: rgba(15, 23, 42, .98) !important;
    border-right-color: var(--crm-dark-border) !important;
    box-shadow: 20px 0 60px rgba(0,0,0,.24);
}

.crm-app.crm-design-dark .crm-topbar,
.crm-app.crm-design-dark .crm-card,
.crm-app.crm-design-dark .crm-panel,
.crm-app.crm-design-dark .crm-module,
.crm-app.crm-design-dark .crm-dashboard-card,
.crm-app.crm-design-dark .crm-stat-card,
.crm-app.crm-design-dark .crm-kpi-card,
.crm-app.crm-design-dark .crm-project-card,
.crm-app.crm-design-dark .crm-report-card,
.crm-app.crm-design-dark .crm-modal,
.crm-app.crm-design-dark .crm-table-wrap,
.crm-app.crm-design-dark .crm-data-table,
.crm-app.crm-design-dark form.crm-card,
.crm-app.crm-design-dark .crm-project-status-card,
.crm-app.crm-design-dark .crm-risk-card,
.crm-app.crm-design-dark .crm-mobile-action-menu-content {
    background: rgba(30, 41, 59, .96) !important;
    border-color: var(--crm-dark-border) !important;
    color: var(--crm-dark-text) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .24) !important;
}

.crm-app.crm-design-dark .crm-page-header,
.crm-app.crm-design-dark .crm-breadcrumb,
.crm-app.crm-design-dark .crm-back-link,
.crm-app.crm-design-dark .crm-topbar-title h1,
.crm-app.crm-design-dark .crm-page-header h2,
.crm-app.crm-design-dark .crm-page-header p,
.crm-app.crm-design-dark .crm-card h1,
.crm-app.crm-design-dark .crm-card h2,
.crm-app.crm-design-dark .crm-card h3,
.crm-app.crm-design-dark .crm-card strong,
.crm-app.crm-design-dark .crm-panel h1,
.crm-app.crm-design-dark .crm-panel h2,
.crm-app.crm-design-dark .crm-panel h3,
.crm-app.crm-design-dark .crm-module-title,
.crm-app.crm-design-dark h1,
.crm-app.crm-design-dark h2,
.crm-app.crm-design-dark h3,
.crm-app.crm-design-dark label,
.crm-app.crm-design-dark strong {
    color: var(--crm-dark-text) !important;
}

.crm-app.crm-design-dark p,
.crm-app.crm-design-dark small,
.crm-app.crm-design-dark .crm-module-desc,
.crm-app.crm-design-dark .crm-muted,
.crm-app.crm-design-dark .crm-table-muted,
.crm-app.crm-design-dark .description {
    color: var(--crm-dark-muted) !important;
}

.crm-app.crm-design-dark table,
.crm-app.crm-design-dark thead,
.crm-app.crm-design-dark tbody,
.crm-app.crm-design-dark tr,
.crm-app.crm-design-dark td,
.crm-app.crm-design-dark th {
    background: transparent !important;
    color: var(--crm-dark-text) !important;
    border-color: var(--crm-dark-border) !important;
}

.crm-app.crm-design-dark th,
.crm-app.crm-design-dark thead tr {
    background: rgba(15, 23, 42, .56) !important;
    color: var(--crm-dark-muted) !important;
}

.crm-app.crm-design-dark tbody tr:hover {
    background: rgba(245, 158, 11, .08) !important;
}

.crm-app.crm-design-dark input,
.crm-app.crm-design-dark select,
.crm-app.crm-design-dark textarea {
    background: rgba(15, 23, 42, .72) !important;
    border-color: var(--crm-dark-border) !important;
    color: var(--crm-dark-text) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.crm-app.crm-design-dark input::placeholder,
.crm-app.crm-design-dark textarea::placeholder {
    color: var(--crm-dark-soft) !important;
}

.crm-app.crm-design-dark option {
    background: #111827 !important;
    color: var(--crm-dark-text) !important;
}

.crm-app.crm-design-dark .crm-button,
.crm-app.crm-design-dark button.crm-button,
.crm-app.crm-design-dark a.crm-button,
.crm-app.crm-design-dark .crm-primary-button,
.crm-app.crm-design-dark .crm-form .crm-button[type="submit"] {
    background: var(--crm-dark-accent) !important;
    border-color: rgba(245, 158, 11, .56) !important;
    color: #111827 !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.28) !important;
}

.crm-app.crm-design-dark .crm-button.crm-btn-danger,
.crm-app.crm-design-dark .crm-btn-danger {
    background: #dc2626 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}

.crm-app.crm-design-dark .crm-button.crm-btn-edit,
.crm-app.crm-design-dark .crm-secondary-button,
.crm-app.crm-design-dark .crm-mobile-action-menu summary {
    background: #374151 !important;
    border-color: rgba(148, 163, 184, .34) !important;
    color: #fff !important;
}

.crm-app.crm-design-dark .crm-menu a {
    color: var(--crm-dark-muted) !important;
}

.crm-app.crm-design-dark .crm-menu a.active,
.crm-app.crm-design-dark .crm-menu a:hover {
    background: rgba(245, 158, 11, .13) !important;
    color: #fff !important;
    border-color: rgba(245, 158, 11, .28) !important;
}

.crm-app.crm-design-dark .crm-alert,
.crm-app.crm-design-dark .notice,
.crm-app.crm-design-dark .crm-empty-state {
    background: rgba(30, 41, 59, .98) !important;
    border-color: var(--crm-dark-border) !important;
    color: var(--crm-dark-text) !important;
}

/* Liquid kontraszt erősítés */
.crm-app.crm-design-liquid {
    --crm-liquid-panel-bg: rgba(255,255,255,.82);
    --crm-liquid-border: rgba(255,255,255,.48);
}

.crm-app.crm-design-liquid .crm-card,
.crm-app.crm-design-liquid .crm-panel,
.crm-app.crm-design-liquid .crm-module,
.crm-app.crm-design-liquid .crm-dashboard-card,
.crm-app.crm-design-liquid .crm-stat-card,
.crm-app.crm-design-liquid .crm-kpi-card,
.crm-app.crm-design-liquid .crm-project-card,
.crm-app.crm-design-liquid .crm-report-card,
.crm-app.crm-design-liquid .crm-table-wrap,
.crm-app.crm-design-liquid .crm-data-table,
.crm-app.crm-design-liquid form.crm-card,
.crm-app.crm-design-liquid .crm-project-status-card,
.crm-app.crm-design-liquid .crm-risk-card {
    color: #0f172a !important;
}

.crm-app.crm-design-liquid th,
.crm-app.crm-design-liquid thead tr {
    background: rgba(255,255,255,.42) !important;
    color: #334155 !important;
}

.crm-app.crm-design-liquid td,
.crm-app.crm-design-liquid .crm-card p,
.crm-app.crm-design-liquid .crm-card small,
.crm-app.crm-design-liquid .crm-module-desc,
.crm-app.crm-design-liquid .crm-muted,
.crm-app.crm-design-liquid .crm-table-muted {
    color: rgba(15,23,42,.82) !important;
}

.crm-app.crm-design-liquid tbody tr:hover {
    background: rgba(255,255,255,.34) !important;
}

.crm-app.crm-design-liquid .crm-button,
.crm-app.crm-design-liquid button.crm-button,
.crm-app.crm-design-liquid a.crm-button,
.crm-app.crm-design-liquid .crm-primary-button,
.crm-app.crm-design-liquid .crm-form .crm-button[type="submit"] {
    background: var(--crm-liquid-accent) !important;
    border-color: rgba(15,23,42,.12) !important;
    color: #111827 !important;
    text-shadow: none !important;
}

.crm-app.crm-design-liquid .crm-button.crm-btn-danger,
.crm-app.crm-design-liquid .crm-btn-danger {
    background: #dc2626 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}

.crm-app.crm-design-liquid .crm-button.crm-btn-edit,
.crm-app.crm-design-liquid .crm-secondary-button,
.crm-app.crm-design-liquid .crm-mobile-action-menu summary {
    background: rgba(55,65,81,.92) !important;
    border-color: rgba(255,255,255,.32) !important;
    color: #fff !important;
}

.crm-app.crm-design-liquid input,
.crm-app.crm-design-liquid select,
.crm-app.crm-design-liquid textarea {
    background: rgba(255,255,255,.82) !important;
    color: #111827 !important;
}

@media print {
    .crm-app.crm-design-dark,
    .crm-app.crm-design-liquid {
        background: #fff !important;
        color: #111827 !important;
    }
}


/* v2.1.2 - Dark Mode hotfix: kártyák, widgetek, panelek valóban sötét felülettel */
.crm-app.crm-design-dark {
    --crm-dark-bg: #0b1120;
    --crm-dark-surface: #0f172a;
    --crm-dark-card: #172033;
    --crm-dark-card-strong: #1e293b;
    --crm-dark-card-soft: #111827;
    --crm-dark-border: rgba(148, 163, 184, .28);
    --crm-dark-text: #f8fafc;
    --crm-dark-muted: #cbd5e1;
}

.crm-app.crm-design-dark .crm-card,
.crm-app.crm-design-dark .crm-panel,
.crm-app.crm-design-dark .crm-soft,
.crm-app.crm-design-dark .crm-module,
.crm-app.crm-design-dark .crm-section,
.crm-app.crm-design-dark .crm-card-section,
.crm-app.crm-design-dark .crm-stat,
.crm-app.crm-design-dark .crm-widget,
.crm-app.crm-design-dark .crm-box,
.crm-app.crm-design-dark .crm-tile,
.crm-app.crm-design-dark .crm-list-item,
.crm-app.crm-design-dark .crm-empty,
.crm-app.crm-design-dark .crm-form-panel,
.crm-app.crm-design-dark .crm-realtime-panel,
.crm-app.crm-design-dark .crm-dashboard-card,
.crm-app.crm-design-dark .crm-stat-card,
.crm-app.crm-design-dark .crm-kpi-card,
.crm-app.crm-design-dark .crm-project-card,
.crm-app.crm-design-dark .crm-client-project-card,
.crm-app.crm-design-dark .crm-client-surface-card,
.crm-app.crm-design-dark .crm-client-timeline-item,
.crm-app.crm-design-dark .crm-risk-project-item,
.crm-app.crm-design-dark .crm-recent-work-item,
.crm-app.crm-design-dark .crm-daily-log-card,
.crm-app.crm-design-dark .crm-chart-card,
.crm-app.crm-design-dark .crm-preview-card,
.crm-app.crm-design-dark .crm-design-preview-card,
.crm-app.crm-design-dark .crm-report-card,
.crm-app.crm-design-dark .crm-project-status-card,
.crm-app.crm-design-dark .crm-risk-card,
.crm-app.crm-design-dark .crm-report-toolbar,
.crm-app.crm-design-dark .crm-performance-summary-grid,
.crm-app.crm-design-dark .crm-performance-print-section,
.crm-app.crm-design-dark .crm-mobile-dashboard-performance-action,
.crm-app.crm-design-dark .crm-mobile-action-menu-content,
.crm-app.crm-design-dark .ecrm-daily-builder-card,
.crm-app.crm-design-dark .ecrm-work-entry-card,
.crm-app.crm-design-dark .ecrm-cost-period-panel,
.crm-app.crm-design-dark .crm-danger-zone,
.crm-app.crm-design-dark form.crm-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, .98), rgba(15, 23, 42, .98)) !important;
    border-color: var(--crm-dark-border) !important;
    color: var(--crm-dark-text) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32) !important;
}

.crm-app.crm-design-dark .crm-topbar {
    background: rgba(15, 23, 42, .96) !important;
    border-color: var(--crm-dark-border) !important;
    color: var(--crm-dark-text) !important;
}

.crm-app.crm-design-dark .crm-card *,
.crm-app.crm-design-dark .crm-panel *,
.crm-app.crm-design-dark .crm-stat *,
.crm-app.crm-design-dark .crm-list-item *,
.crm-app.crm-design-dark .crm-table-wrap *,
.crm-app.crm-design-dark .crm-modal * {
    border-color: var(--crm-dark-border);
}

.crm-app.crm-design-dark .crm-card h1,
.crm-app.crm-design-dark .crm-card h2,
.crm-app.crm-design-dark .crm-card h3,
.crm-app.crm-design-dark .crm-card h4,
.crm-app.crm-design-dark .crm-panel h1,
.crm-app.crm-design-dark .crm-panel h2,
.crm-app.crm-design-dark .crm-panel h3,
.crm-app.crm-design-dark .crm-panel h4,
.crm-app.crm-design-dark .crm-card-title,
.crm-app.crm-design-dark .crm-section-head,
.crm-app.crm-design-dark .crm-section-head h1,
.crm-app.crm-design-dark .crm-section-head h2,
.crm-app.crm-design-dark .crm-section-head h3,
.crm-app.crm-design-dark .crm-stat strong,
.crm-app.crm-design-dark .crm-stat span,
.crm-app.crm-design-dark .crm-list-item strong,
.crm-app.crm-design-dark .crm-list-item b,
.crm-app.crm-design-dark .crm-data-table strong,
.crm-app.crm-design-dark .crm-table strong {
    color: var(--crm-dark-text) !important;
}

.crm-app.crm-design-dark .crm-card p,
.crm-app.crm-design-dark .crm-card small,
.crm-app.crm-design-dark .crm-card span,
.crm-app.crm-design-dark .crm-panel p,
.crm-app.crm-design-dark .crm-panel small,
.crm-app.crm-design-dark .crm-panel span,
.crm-app.crm-design-dark .crm-stat small,
.crm-app.crm-design-dark .crm-muted,
.crm-app.crm-design-dark .crm-table-muted,
.crm-app.crm-design-dark .description,
.crm-app.crm-design-dark .crm-help-text,
.crm-app.crm-design-dark .crm-kicker {
    color: var(--crm-dark-muted) !important;
}

.crm-app.crm-design-dark .crm-table-wrap,
.crm-app.crm-design-dark .crm-table,
.crm-app.crm-design-dark .crm-data-table,
.crm-app.crm-design-dark table.crm-table,
.crm-app.crm-design-dark table.crm-data-table {
    background: rgba(15, 23, 42, .96) !important;
    color: var(--crm-dark-text) !important;
    border-color: var(--crm-dark-border) !important;
}

.crm-app.crm-design-dark table,
.crm-app.crm-design-dark thead,
.crm-app.crm-design-dark tbody,
.crm-app.crm-design-dark tfoot,
.crm-app.crm-design-dark tr,
.crm-app.crm-design-dark td,
.crm-app.crm-design-dark th {
    color: var(--crm-dark-text) !important;
    border-color: var(--crm-dark-border) !important;
}

.crm-app.crm-design-dark tbody tr,
.crm-app.crm-design-dark .crm-table tbody tr,
.crm-app.crm-design-dark .crm-data-table tbody tr {
    background: rgba(17, 24, 39, .82) !important;
}

.crm-app.crm-design-dark tbody tr:nth-child(even),
.crm-app.crm-design-dark .crm-table tbody tr:nth-child(even),
.crm-app.crm-design-dark .crm-data-table tbody tr:nth-child(even) {
    background: rgba(30, 41, 59, .72) !important;
}

.crm-app.crm-design-dark th,
.crm-app.crm-design-dark thead tr,
.crm-app.crm-design-dark .crm-table thead tr,
.crm-app.crm-design-dark .crm-data-table thead tr {
    background: rgba(2, 6, 23, .82) !important;
    color: #e2e8f0 !important;
}

.crm-app.crm-design-dark tbody tr:hover,
.crm-app.crm-design-dark .crm-list-item:hover {
    background: rgba(245, 158, 11, .10) !important;
}

.crm-app.crm-design-dark input,
.crm-app.crm-design-dark select,
.crm-app.crm-design-dark textarea,
.crm-app.crm-design-dark .select2-selection,
.crm-app.crm-design-dark .crm-input {
    background: rgba(15, 23, 42, .96) !important;
    color: var(--crm-dark-text) !important;
    border-color: var(--crm-dark-border) !important;
}

.crm-app.crm-design-dark .crm-alert,
.crm-app.crm-design-dark .crm-alert-info,
.crm-app.crm-design-dark .crm-alert-warning,
.crm-app.crm-design-dark .crm-alert-error,
.crm-app.crm-design-dark .crm-alert-success {
    background: rgba(30, 41, 59, .96) !important;
    border-color: var(--crm-dark-border) !important;
    color: var(--crm-dark-text) !important;
}

.crm-app.crm-design-dark .crm-modal,
.crm-app.crm-design-dark .crm-modal-content,
.crm-app.crm-design-dark .crm-dialog,
.crm-app.crm-design-dark .crm-popup {
    background: #0f172a !important;
    color: var(--crm-dark-text) !important;
    border-color: var(--crm-dark-border) !important;
}

/* v2.1.8 - Removed heavy dark progress track background; individual progress tracks keep their own styling. */

.crm-app.crm-design-dark .crm-badge,
.crm-app.crm-design-dark .crm-status,
.crm-app.crm-design-dark .crm-pill {
    border-color: var(--crm-dark-border) !important;
}

@media print {
    .crm-app.crm-design-dark,
    .crm-app.crm-design-dark * {
        background: revert !important;
        color: revert !important;
        box-shadow: none !important;
    }
}

/* v2.1.3 - Dark Mode kontraszt hotfix: vissza gombok, badge-ek, címkék */
.crm-app.crm-design-dark .crm-back-link,
.crm-app.crm-design-dark a.crm-back-link,
.crm-app.crm-design-dark .crm-btn-secondary,
.crm-app.crm-design-dark .crm-button.crm-btn-secondary,
.crm-app.crm-design-dark .crm-secondary-button,
.crm-app.crm-design-dark .crm-action-secondary {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(148, 163, 184, .32) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22) !important;
}

.crm-app.crm-design-dark .crm-back-link:hover,
.crm-app.crm-design-dark a.crm-back-link:hover,
.crm-app.crm-design-dark .crm-btn-secondary:hover,
.crm-app.crm-design-dark .crm-button.crm-btn-secondary:hover,
.crm-app.crm-design-dark .crm-secondary-button:hover,
.crm-app.crm-design-dark .crm-action-secondary:hover {
    background: rgba(51, 65, 85, 1) !important;
    border-color: rgba(245, 158, 11, .42) !important;
    color: #fff !important;
}

.crm-app.crm-design-dark .crm-badge,
.crm-app.crm-design-dark .crm-status,
.crm-app.crm-design-dark .crm-pill,
.crm-app.crm-design-dark .crm-user-badge,
.crm-app.crm-design-dark .crm-editing-badge,
.crm-app.crm-design-dark .crm-mobile-version-badge,
.crm-app.crm-design-dark .crm-person-pill,
.crm-app.crm-design-dark .crm-access-badge,
.crm-app.crm-design-dark .crm-status-badge,
.crm-app.crm-design-dark .crm-risk-badge {
    background: rgba(51, 65, 85, .92) !important;
    border: 1px solid rgba(148, 163, 184, .32) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
}

.crm-app.crm-design-dark .crm-person-pill-has-color {
    background: color-mix(in srgb, var(--crm-person-color) 24%, #1e293b) !important;
    border-color: color-mix(in srgb, var(--crm-person-color) 48%, rgba(148,163,184,.32)) !important;
    color: #f8fafc !important;
}

.crm-app.crm-design-dark .crm-person-pill-has-color::before {
    background: var(--crm-person-color) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--crm-person-color) 20%, transparent) !important;
}

.crm-app.crm-design-dark .crm-badge-success,
.crm-app.crm-design-dark .crm-status-success,
.crm-app.crm-design-dark .crm-pill-success,
.crm-app.crm-design-dark .crm-health-success {
    background: rgba(22, 101, 52, .34) !important;
    border-color: rgba(34, 197, 94, .45) !important;
    color: #bbf7d0 !important;
}

.crm-app.crm-design-dark .crm-badge-warning,
.crm-app.crm-design-dark .crm-status-warning,
.crm-app.crm-design-dark .crm-pill-warning,
.crm-app.crm-design-dark .crm-health-warning {
    background: rgba(146, 64, 14, .38) !important;
    border-color: rgba(251, 191, 36, .48) !important;
    color: #fde68a !important;
}

.crm-app.crm-design-dark .crm-badge-danger,
.crm-app.crm-design-dark .crm-status-danger,
.crm-app.crm-design-dark .crm-pill-danger,
.crm-app.crm-design-dark .crm-health-danger,
.crm-app.crm-design-dark .crm-badge-error {
    background: rgba(153, 27, 27, .38) !important;
    border-color: rgba(248, 113, 113, .50) !important;
    color: #fecaca !important;
}

.crm-app.crm-design-dark .crm-badge-info,
.crm-app.crm-design-dark .crm-status-info,
.crm-app.crm-design-dark .crm-pill-info {
    background: rgba(30, 64, 175, .36) !important;
    border-color: rgba(96, 165, 250, .46) !important;
    color: #bfdbfe !important;
}

.crm-app.crm-design-dark .crm-project-assignments,
.crm-app.crm-design-dark .crm-assignment-line,
.crm-app.crm-design-dark .crm-assignment-line > span {
    color: var(--crm-dark-muted) !important;
}

.crm-app.crm-design-dark .crm-risk-list-message,
.crm-app.crm-design-dark .crm-card-subtitle,
.crm-app.crm-design-dark .crm-help-text {
    color: var(--crm-dark-muted) !important;
}

.crm-app.crm-design-dark .crm-realtime-bell,
.crm-app.crm-design-dark .crm-mobile-header-actions .crm-realtime-bell {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(148, 163, 184, .32) !important;
    color: #f8fafc !important;
}

.crm-app.crm-design-dark .crm-realtime-panel,
.crm-app.crm-design-dark .crm-realtime-head,
.crm-app.crm-design-dark .crm-realtime-item {
    background: rgba(15, 23, 42, .98) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #f8fafc !important;
}

.crm-app.crm-design-dark .crm-realtime-item:not(.is-read),
.crm-app.crm-design-dark .crm-realtime-item:hover {
    background: rgba(245, 158, 11, .12) !important;
    border-color: rgba(245, 158, 11, .28) !important;
}

.crm-app.crm-design-dark .crm-realtime-item span,
.crm-app.crm-design-dark .crm-realtime-item em,
.crm-app.crm-design-dark .crm-realtime-empty {
    color: var(--crm-dark-muted) !important;
}

/* v2.1.4 - Dark Mode toolbar fix + dashboard 3-column desktop panels */
.crm-app.crm-design-dark .crm-filter-toolbar,
.crm-app.crm-design-dark .crm-daily-log-filter,
.crm-app.crm-design-dark form.crm-filter-toolbar,
.crm-app.crm-design-dark form.crm-daily-log-filter {
    background: rgba(15, 23, 42, .96) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #f8fafc !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .24) !important;
}
.crm-app.crm-design-dark .crm-filter-toolbar label,
.crm-app.crm-design-dark .crm-filter-toolbar span,
.crm-app.crm-design-dark .crm-daily-log-filter label,
.crm-app.crm-design-dark .crm-daily-log-filter span,
.crm-app.crm-design-dark .crm-field-inline span {
    color: #cbd5e1 !important;
}
.crm-app.crm-design-dark .crm-filter-toolbar input,
.crm-app.crm-design-dark .crm-filter-toolbar select,
.crm-app.crm-design-dark .crm-daily-log-filter input,
.crm-app.crm-design-dark .crm-daily-log-filter select,
.crm-app.crm-design-dark .crm-field-inline input,
.crm-app.crm-design-dark .crm-field-inline select {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(148, 163, 184, .30) !important;
    color: #f8fafc !important;
}
.crm-app.crm-design-dark .crm-filter-toolbar input[type="date"]::-webkit-calendar-picker-indicator,
.crm-app.crm-design-dark .crm-daily-log-filter input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.25);
    opacity: .85;
}
.crm-app.crm-design-dark .crm-current-week-btn,
.crm-app.crm-design-dark a.crm-current-week-btn {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(148, 163, 184, .32) !important;
    color: #f8fafc !important;
}
.crm-app.crm-design-dark .crm-current-week-btn:hover,
.crm-app.crm-design-dark a.crm-current-week-btn:hover {
    background: rgba(51, 65, 85, 1) !important;
    color: #fff !important;
}

.crm-dashboard-main-panels {
    align-items: stretch;
}
.crm-dashboard-main-panels.has-risk-projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.crm-dashboard-main-panels.no-risk-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.crm-dashboard-main-panels > .crm-card {
    min-width: 0;
    height: 100%;
}
.crm-dashboard-main-panels .crm-section-head {
    gap: 12px;
}
.crm-dashboard-main-panels .crm-section-head .crm-btn,
.crm-dashboard-main-panels .crm-section-head .crm-mini-limit-form {
    flex-shrink: 0;
}
.crm-dashboard-main-panels .crm-list-item {
    min-width: 0;
}
.crm-dashboard-main-panels .crm-risk-project-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.crm-dashboard-main-panels .crm-risk-project-meta {
    width: 100%;
    align-items: flex-start;
}
@media (max-width: 1180px) {
    .crm-dashboard-main-panels.has-risk-projects,
    .crm-dashboard-main-panels.no-risk-projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .crm-dashboard-main-panels.has-risk-projects .crm-risk-projects-panel {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    .crm-dashboard-main-panels.has-risk-projects,
    .crm-dashboard-main-panels.no-risk-projects {
        grid-template-columns: 1fr;
    }
    .crm-dashboard-main-panels.has-risk-projects .crm-risk-projects-panel {
        grid-column: auto;
    }
}

/* v2.1.5 - Dark Mode hotfix: reports/operating top panels + visible progress bars */
.crm-app.crm-design-dark .crm-reports-page,
.crm-app.crm-design-dark .crm-operating-costs-page,
.crm-app.crm-design-dark .crm-operating-cost-form,
.crm-app.crm-design-dark .crm-report-view-toolbar,
.crm-app.crm-design-dark .crm-report-context,
.crm-app.crm-design-dark .crm-toolbar,
.crm-app.crm-design-dark .crm-year-toolbar,
.crm-app.crm-design-dark .crm-year-filter,
.crm-app.crm-design-dark .crm-section-head,
.crm-app.crm-design-dark .crm-grid.crm-panel,
.crm-app.crm-design-dark .crm-grid > .crm-stat,
.crm-app.crm-design-dark .crm-stat {
    /* v2.1.7: background removed here so dark cards keep their own softer surface. */
    border-color: rgba(148, 163, 184, .26) !important;
    color: #f8fafc !important;
}

.crm-app.crm-design-dark .crm-reports-page .crm-section-head,
.crm-app.crm-design-dark .crm-operating-costs-page .crm-section-head {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.crm-app.crm-design-dark .crm-report-view-toolbar label,
.crm-app.crm-design-dark .crm-report-view-toolbar span,
.crm-app.crm-design-dark .crm-year-filter label,
.crm-app.crm-design-dark .crm-year-filter span,
.crm-app.crm-design-dark .crm-report-context span,
.crm-app.crm-design-dark .crm-stat span {
    color: #cbd5e1 !important;
}

.crm-app.crm-design-dark .crm-report-view-toolbar select,
.crm-app.crm-design-dark .crm-year-filter select,
.crm-app.crm-design-dark .crm-year-filter input,
.crm-app.crm-design-dark .crm-toolbar input,
.crm-app.crm-design-dark .crm-toolbar select {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(148, 163, 184, .32) !important;
    color: #f8fafc !important;
}

.crm-app.crm-design-dark .crm-report-context strong,
.crm-app.crm-design-dark .crm-stat strong,
.crm-app.crm-design-dark .crm-card-title {
    color: #f8fafc !important;
}

.crm-app.crm-design-dark .crm-progress,
.crm-app.crm-design-dark .crm-report-progress,
.crm-app.crm-design-dark .crm-print-mini-progress,
.crm-app.crm-design-dark .crm-client-main-progress,
.crm-app.crm-design-dark .crm-client-workflow-progress {
    background: rgba(51, 65, 85, .98) !important;
    border: 1px solid rgba(148, 163, 184, .28) !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.32) !important;
}

.crm-app.crm-design-dark .crm-progress > .crm-progress-bar,
.crm-app.crm-design-dark .crm-progress-bar,
.crm-app.crm-design-dark .crm-report-progress > div,
.crm-app.crm-design-dark .crm-print-mini-progress > span,
.crm-app.crm-design-dark .crm-client-main-progress > div,
.crm-app.crm-design-dark .crm-client-workflow-progress > div {
    background: var(--crm-progress-color, #f59e0b) !important;
    border: 0 !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, .28) !important;
}

.crm-app.crm-design-dark .crm-time-progress-ok .crm-progress-bar { background: #22c55e !important; box-shadow: 0 0 14px rgba(34,197,94,.25) !important; }
.crm-app.crm-design-dark .crm-time-progress-warning .crm-progress-bar { background: #f59e0b !important; box-shadow: 0 0 14px rgba(245,158,11,.25) !important; }
.crm-app.crm-design-dark .crm-time-progress-danger .crm-progress-bar { background: #ef4444 !important; box-shadow: 0 0 14px rgba(239,68,68,.25) !important; }
.crm-app.crm-design-dark .crm-time-progress-neutral .crm-progress-bar { background: #94a3b8 !important; box-shadow: none !important; }

.crm-app.crm-design-dark .crm-progress-label,
.crm-app.crm-design-dark .crm-project-progress-row small,
.crm-app.crm-design-dark .crm-project-detail-progress-stat small,
.crm-app.crm-design-dark .crm-report-line-label,
.crm-app.crm-design-dark .crm-report-line-label strong,
.crm-app.crm-design-dark .crm-report-line-label span {
    color: #e2e8f0 !important;
}


/* v2.1.6 - Dark Mode icon containers + dashboard top 50/50 layout */
.crm-app.crm-design-dark .crm-module-icon,
.crm-app.crm-design-dark .crm-settings-card-icon,
.crm-app.crm-design-dark .crm-card-icon,
.crm-app.crm-design-dark .crm-project-module-grid .crm-module-icon,
.crm-app.crm-design-dark .crm-module .crm-module-icon {
    background: rgba(15, 23, 42, .92) !important;
    border: 1px solid rgba(148, 163, 184, .28) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.22) !important;
}

.crm-app.crm-design-dark .crm-module-icon svg,
.crm-app.crm-design-dark .crm-settings-card-icon svg,
.crm-app.crm-design-dark .crm-card-icon svg,
.crm-app.crm-design-dark .crm-project-module-grid .crm-module-icon svg {
    color: #f8fafc !important;
    stroke: currentColor !important;
}

.crm-app.crm-design-dark .crm-module:hover .crm-module-icon,
.crm-app.crm-design-dark .crm-settings-card:hover .crm-settings-card-icon,
.crm-app.crm-design-dark .crm-project-module-grid .crm-module:hover .crm-module-icon {
    background: rgba(245, 158, 11, .22) !important;
    border-color: rgba(245, 158, 11, .48) !important;
    color: #fde68a !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 28px rgba(245,158,11,.14) !important;
}

.crm-app.crm-design-dark .crm-module:hover .crm-module-icon svg,
.crm-app.crm-design-dark .crm-settings-card:hover .crm-settings-card-icon svg,
.crm-app.crm-design-dark .crm-project-module-grid .crm-module:hover .crm-module-icon svg {
    color: #fde68a !important;
}

.crm-dashboard-top-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.crm-dashboard-top-panels.has-dashboard-warnings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-dashboard-top-panels > .crm-card {
    height: 100%;
    min-width: 0;
    margin: 0 !important;
}

.crm-dashboard-top-panels .crm-actions {
    height: auto;
}

@media (max-width: 900px) {
    .crm-dashboard-top-panels,
    .crm-dashboard-top-panels.has-dashboard-warnings {
        grid-template-columns: 1fr;
    }
}


/* v2.1.7 - Dark mode quick toggle + softer dark toolbar/panel backgrounds */
.crm-design-quick-toggle {
    display: inline-flex;
    align-items: center;
    margin: 0 8px 0 0;
    padding: 0;
}
.crm-design-toggle-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--crm-border, #dfe3ea);
    border-radius: 12px;
    background: #fff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 6px 18px rgba(15,23,42,.06);
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.crm-design-toggle-btn:hover,
.crm-design-toggle-btn:focus {
    background: #f8fafc;
    border-color: rgba(242,163,26,.45);
    transform: translateY(-1px);
}
.crm-design-toggle-icon {
    font-size: 17px;
    line-height: 1;
}
.crm-design-toggle-desktop {
    margin-left: 0;
    margin-right: 8px;
}
.crm-app.crm-design-dark .crm-design-toggle-btn {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(148, 163, 184, .32) !important;
    color: #f8fafc !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.24) !important;
}
.crm-app.crm-design-dark .crm-design-toggle-btn:hover,
.crm-app.crm-design-dark .crm-design-toggle-btn:focus {
    background: rgba(51, 65, 85, .98) !important;
    border-color: rgba(245, 158, 11, .44) !important;
}
.crm-app.crm-design-dark .crm-reports-page,
.crm-app.crm-design-dark .crm-operating-costs-page,
.crm-app.crm-design-dark .crm-operating-cost-form,
.crm-app.crm-design-dark .crm-report-view-toolbar,
.crm-app.crm-design-dark .crm-report-context,
.crm-app.crm-design-dark .crm-toolbar,
.crm-app.crm-design-dark .crm-year-toolbar,
.crm-app.crm-design-dark .crm-year-filter,
.crm-app.crm-design-dark .crm-section-head,
.crm-app.crm-design-dark .crm-grid.crm-panel,
.crm-app.crm-design-dark .crm-grid > .crm-stat,
.crm-app.crm-design-dark .crm-stat {
    background: transparent !important;
}
.crm-app.crm-design-dark .crm-report-view-toolbar,
.crm-app.crm-design-dark .crm-report-context,
.crm-app.crm-design-dark .crm-toolbar,
.crm-app.crm-design-dark .crm-year-toolbar,
.crm-app.crm-design-dark .crm-year-filter {
    border-color: rgba(148, 163, 184, .22) !important;
}
@media (max-width: 1000px) {
    .crm-design-toggle-desktop { display: none !important; }
    .crm-design-toggle-mobile {
        display: inline-flex;
        margin: 0;
    }
    .crm-design-toggle-mobile .crm-design-toggle-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: #2f343a !important;
        color: #fff !important;
        border-color: #2f343a !important;
        box-shadow: none !important;
    }
}
@media (min-width: 1001px) {
    .crm-design-toggle-mobile { display: none !important; }
}
@media (max-width: 420px) {
    .crm-design-toggle-mobile .crm-design-toggle-btn {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
    }
}


/* v2.1.9 - Dashboard recent project schedule progress */
.crm-dashboard-recent-project-item .crm-dashboard-project-progress {
    width: 180px;
    max-width: 48%;
    min-width: 170px;
}

.crm-dashboard-recent-project-item .crm-project-progress-row {
    grid-template-columns: minmax(95px, 1fr) auto;
}

.crm-dashboard-recent-project-item .crm-time-progress {
    height: 8px;
}

.crm-dashboard-recent-project-item .crm-project-progress-row small {
    font-size: 12px;
}

.crm-dashboard-recent-project-item .crm-time-progress-row small {
    color: var(--crm-muted);
}

@media (max-width: 700px) {
    .crm-dashboard-recent-project-item .crm-dashboard-project-progress {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

.crm-app.crm-design-dark .crm-dashboard-recent-project-item .crm-time-progress-row small {
    color: #e2e8f0 !important;
}


/* v2.1.10 - Desktop content padding + dark chart/table polish */
@media (min-width: 1025px) {
    .crm-main {
        padding-left: var(--crm-main-padding, 25px) !important;
        padding-right: var(--crm-main-padding, 25px) !important;
    }
}

/* Dark mode: matrix / tabular project report should follow dark card surfaces, not high-contrast light headers. */
.crm-app.crm-design-dark .crm-matrix-wrap {
    background: rgba(30, 41, 59, .72) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .18) !important;
    scrollbar-color: rgba(148, 163, 184, .42) rgba(15, 23, 42, .28) !important;
}
.crm-app.crm-design-dark .crm-matrix-wrap::after {
    background: linear-gradient(90deg, rgba(15,23,42,0), rgba(15,23,42,.30)) !important;
}
.crm-app.crm-design-dark .crm-matrix-table {
    background: rgba(15, 23, 42, .12) !important;
    color: var(--crm-dark-text) !important;
}
.crm-app.crm-design-dark .crm-matrix-table th,
.crm-app.crm-design-dark .crm-matrix-table td {
    border-color: rgba(148, 163, 184, .16) !important;
    color: var(--crm-dark-text) !important;
}
.crm-app.crm-design-dark .crm-matrix-table thead th,
.crm-app.crm-design-dark .crm-matrix-table thead tr:nth-child(2) th,
.crm-app.crm-design-dark .crm-matrix-table thead .crm-matrix-date,
.crm-app.crm-design-dark .crm-matrix-date,
.crm-app.crm-design-dark .crm-matrix-surface,
.crm-app.crm-design-dark .crm-matrix-workflow {
    background: rgba(30, 41, 59, .86) !important;
    color: var(--crm-dark-text) !important;
}
.crm-app.crm-design-dark .crm-matrix-table th.crm-matrix-group-alt,
.crm-app.crm-design-dark .crm-matrix-table td.crm-matrix-group-alt,
.crm-app.crm-design-dark .crm-matrix-table th.crm-matrix-surface.crm-matrix-group-alt,
.crm-app.crm-design-dark .crm-matrix-table th.crm-matrix-workflow.crm-matrix-group-alt {
    background: rgba(36, 52, 73, .76) !important;
    color: var(--crm-dark-text) !important;
}
.crm-app.crm-design-dark .crm-matrix-table tbody td {
    background-color: rgba(15, 23, 42, .20) !important;
}
.crm-app.crm-design-dark .crm-matrix-table tbody td.crm-matrix-group-alt {
    background-color: rgba(30, 41, 59, .30) !important;
}
.crm-app.crm-design-dark .crm-matrix-filled {
    background: rgba(34, 197, 94, .13) !important;
}
.crm-app.crm-design-dark .crm-matrix-table td.crm-matrix-filled.crm-matrix-group-alt {
    background: rgba(34, 197, 94, .17) !important;
}
.crm-app.crm-design-dark .crm-matrix-filled strong {
    color: #bbf7d0 !important;
}
.crm-app.crm-design-dark .crm-weekend-row th,
.crm-app.crm-design-dark .crm-weekend-row td,
.crm-app.crm-design-dark .crm-weekend-row .crm-matrix-date,
.crm-app.crm-design-dark .crm-weekend-row td.crm-matrix-group-alt {
    background: rgba(51, 65, 85, .34) !important;
}
.crm-app.crm-design-dark .crm-weekend-row td.crm-matrix-filled,
.crm-app.crm-design-dark .crm-weekend-row td.crm-matrix-filled.crm-matrix-group-alt {
    background: rgba(34, 197, 94, .20) !important;
}
.crm-app.crm-design-dark .crm-matrix-empty {
    color: rgba(203, 213, 225, .48) !important;
}
.crm-app.crm-design-dark .crm-matrix-table small,
.crm-app.crm-design-dark .crm-report-help {
    color: rgba(203, 213, 225, .76) !important;
}

/* Canvas charts are redrawn with theme-aware colors in JS; keep the canvas/cards dark-compatible. */
.crm-app.crm-design-dark canvas.ecrm-line-chart,
.crm-app.crm-design-dark canvas.ecrm-bar-chart {
    background: transparent !important;
}

/* v2.1.12 - Laptop/tablet responsive polish
   Mobil nézet érintetlen: 767px alatt nincs módosítás.
   1599px-ig max. 2 oszlop; 1600px felett max. 3 oszlop; nagy desktopon maradhat 4. */
@media (min-width: 1200px) and (max-width: 1599px) {
    .crm-app .crm-grid-3,
    .crm-app .crm-grid-4,
    .crm-app .crm-grid-5,
    .crm-app .crm-performance-summary-grid,
    .crm-app .crm-report-stat-grid,
    .crm-app .crm-dashboard-top-grid.crm-dashboard-top-with-risk,
    .crm-app .crm-dashboard-top-grid.crm-dashboard-top-no-risk {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .crm-app .ecrm-work-entry-grid,
    .crm-app .ecrm-work-entry-simple-grid,
    .crm-app .ecrm-material-row {
        grid-template-columns: inherit;
    }
}

@media (min-width: 1600px) and (max-width: 1919px) {
    .crm-app .crm-grid-4,
    .crm-app .crm-grid-5,
    .crm-app .crm-performance-summary-grid,
    .crm-app .crm-report-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .crm-app .ecrm-work-entry-grid,
    .crm-app .ecrm-work-entry-simple-grid,
    .crm-app .ecrm-material-row {
        grid-template-columns: inherit;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .crm-app .crm-grid-3,
    .crm-app .crm-grid-4,
    .crm-app .crm-grid-5,
    .crm-app .crm-performance-summary-grid,
    .crm-app .crm-report-stat-grid,
    .crm-app .crm-dashboard-top-grid.crm-dashboard-top-with-risk,
    .crm-app .crm-dashboard-top-grid.crm-dashboard-top-no-risk {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .crm-app .ecrm-work-entry-grid,
    .crm-app .ecrm-work-entry-simple-grid,
    .crm-app .ecrm-material-row {
        grid-template-columns: inherit;
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .crm-app .crm-grid-3,
    .crm-app .crm-grid-4,
    .crm-app .crm-grid-5,
    .crm-app .crm-performance-summary-grid,
    .crm-app .crm-report-stat-grid,
    .crm-app .crm-dashboard-top-grid.crm-dashboard-top-with-risk,
    .crm-app .crm-dashboard-top-grid.crm-dashboard-top-no-risk {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .crm-app .ecrm-work-entry-grid,
    .crm-app .ecrm-work-entry-simple-grid,
    .crm-app .ecrm-material-row {
        grid-template-columns: inherit;
    }
}

/* Cloudflare Turnstile login protection */
.crm-turnstile-wrap {
    margin: 14px 0 12px;
    min-height: 65px;
}
.crm-turnstile-wrap .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* Knowledge base */
.crm-kb-intro { margin-bottom: 18px; }
.crm-kb-audience { margin-top: 22px; }
.crm-kb-audience-head h2 { margin: 0 0 12px; font-size: 22px; }
.crm-kb-toc { margin-bottom: 18px; }
.crm-kb-toc h3 { margin-top: 0; }
.crm-kb-toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.crm-kb-toc-grid a { display: block; padding: 12px 14px; border: 1px solid var(--crm-border, #e5e7eb); border-radius: 12px; text-decoration: none; font-weight: 700; background: rgba(255,255,255,.6); }
.crm-kb-section { scroll-margin-top: 18px; margin-bottom: 18px; }
.crm-kb-card h2 { margin-top: 0; }
.crm-kb-lead { font-size: 15px; opacity: .86; }
.crm-kb-block { padding: 14px 0; border-top: 1px solid var(--crm-border, #e5e7eb); }
.crm-kb-block:first-of-type { border-top: 0; }
.crm-kb-block h3 { margin: 0 0 8px; font-size: 17px; }
.crm-kb-block p { margin: 0 0 10px; line-height: 1.55; }
.crm-kb-formula, .crm-kb-example { margin-top: 10px; padding: 12px 14px; border-radius: 12px; line-height: 1.5; }
.crm-kb-formula { background: rgba(59,130,246,.10); border: 1px solid rgba(59,130,246,.18); }
.crm-kb-example { background: rgba(16,185,129,.10); border: 1px solid rgba(16,185,129,.18); }
@media (max-width: 767px) {
    .crm-kb-toc-grid { grid-template-columns: 1fr; }
}


.crm-stat-breakdown {
    display: grid;
    gap: 3px;
    margin-top: 10px;
}

.crm-stat .crm-stat-breakdown small {
    display: block;
    margin: 0;
    line-height: 1.35;
}


/* V2.1.18: munkafolyamat célmennyiség segédsáv – badge állapot, jobb oldali narancs gomb */
.crm-surface-quantity-helper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--crm-border, #e2e8f0);
    border-radius: var(--crm-radius, 14px);
    background: var(--crm-surface-soft, #f8fafc);
}

.crm-surface-quantity-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.crm-surface-quantity-helper strong {
    margin-right: 0;
}

.crm-surface-quantity-helper .crm-button {
    flex: 0 0 auto;
    margin-left: auto;
    background: var(--crm-primary, #f2a31a);
    color: #fff !important;
    border: 1px solid var(--crm-primary, #f2a31a);
    box-shadow: 0 8px 18px rgba(242, 163, 26, .22);
}

.crm-surface-quantity-helper .crm-button:hover {
    background: var(--crm-primary-dark, #c98208);
    border-color: var(--crm-primary-dark, #c98208);
}

.crm-quantity-note {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-left: 8px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--crm-muted, #64748b);
    background: rgba(100, 116, 139, .10);
    border: 1px solid rgba(100, 116, 139, .18);
}

.crm-quantity-note:empty {
    display: none;
}

.crm-quantity-note-success {
    color: var(--crm-success, #2f9e44);
    background: rgba(47, 158, 68, .12);
    border-color: rgba(47, 158, 68, .22);
}

.crm-quantity-note-warning {
    color: #92400e;
    background: rgba(245, 158, 11, .18);
    border-color: rgba(245, 158, 11, .30);
}

.crm-quantity-note-info {
    color: #2563eb;
    background: rgba(37, 99, 235, .12);
    border-color: rgba(37, 99, 235, .24);
}

@media (max-width: 767px) {
    .crm-surface-quantity-helper {
        align-items: flex-start;
    }

    .crm-surface-quantity-main,
    .crm-quantity-note,
    .crm-surface-quantity-helper .crm-button {
        width: 100%;
        margin-left: 0;
    }
}

/* Knowledge base visual example cards */
.crm-kb-visual-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.crm-kb-example-card {
    border: 1px solid var(--crm-border, #e5e7eb);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.crm-kb-example-card-example { border-left: 4px solid var(--crm-primary, #f97316); }
.crm-kb-example-card-success { border-left: 4px solid #22c55e; }
.crm-kb-example-card-danger { border-left: 4px solid #ef4444; }
.crm-kb-example-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.crm-kb-example-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(249, 115, 22, .12);
    font-size: 19px;
    flex: 0 0 36px;
}
.crm-kb-example-card-head strong {
    display: block;
    color: var(--crm-text, #111827);
    font-size: 15px;
}
.crm-kb-example-card-head small {
    display: block;
    margin-top: 2px;
    color: var(--crm-muted, #6b7280);
    font-size: 12px;
}
.crm-kb-example-rows {
    margin: 0;
    display: grid;
    gap: 8px;
}
.crm-kb-example-rows > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, .45);
}
.crm-kb-example-rows > div:last-child { border-bottom: 0; }
.crm-kb-example-rows dt {
    margin: 0;
    color: var(--crm-muted, #6b7280);
    font-size: 13px;
}
.crm-kb-example-rows dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
    color: var(--crm-text, #111827);
    font-size: 13px;
}
.crm-kb-example-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.crm-kb-mini-badge {
    font-size: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(249, 115, 22, .12);
    color: #9a3412;
}
.crm-kb-example-note {
    margin: 12px 0 0 !important;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .04);
    color: var(--crm-muted, #4b5563);
    font-size: 13px;
}
.crm-kb-mini-table-wrap { overflow-x: auto; margin-top: 4px; }
.crm-kb-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.crm-kb-mini-table th,
.crm-kb-mini-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--crm-border, #e5e7eb);
    text-align: right;
}
.crm-kb-mini-table th:first-child,
.crm-kb-mini-table td:first-child { text-align: left; }
.crm-kb-mini-table th {
    background: rgba(15, 23, 42, .04);
    font-weight: 800;
}
@media (max-width: 640px) {
    .crm-kb-visual-examples { grid-template-columns: 1fr; }
    .crm-kb-example-rows > div { display: block; }
    .crm-kb-example-rows dd { text-align: left; margin-top: 2px; }
}


/* v2.1.22 - Tudásbázis példa kártyák és mini táblázatok dark mode javítás */
.crm-app.crm-design-dark .crm-kb-toc-grid a,
.crm-app.crm-design-dark .crm-kb-example-card {
    background: rgba(30, 41, 59, .96) !important;
    border-color: var(--crm-dark-border, rgba(148, 163, 184, .22)) !important;
    color: var(--crm-dark-text, #e5e7eb) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .24) !important;
}

.crm-app.crm-design-dark .crm-kb-example-card-head strong,
.crm-app.crm-design-dark .crm-kb-example-rows dd {
    color: var(--crm-dark-text, #e5e7eb) !important;
}

.crm-app.crm-design-dark .crm-kb-example-card-head small,
.crm-app.crm-design-dark .crm-kb-example-rows dt,
.crm-app.crm-design-dark .crm-kb-example-note {
    color: var(--crm-dark-muted, #cbd5e1) !important;
}

.crm-app.crm-design-dark .crm-kb-example-icon,
.crm-app.crm-design-dark .crm-kb-mini-badge {
    background: rgba(245, 158, 11, .16) !important;
    color: var(--crm-dark-accent, #f59e0b) !important;
}

.crm-app.crm-design-dark .crm-kb-example-note,
.crm-app.crm-design-dark .crm-kb-formula,
.crm-app.crm-design-dark .crm-kb-example {
    background: rgba(15, 23, 42, .58) !important;
    border-color: var(--crm-dark-border, rgba(148, 163, 184, .22)) !important;
}

.crm-app.crm-design-dark .crm-kb-example-rows > div {
    border-bottom-color: rgba(148, 163, 184, .24) !important;
}

.crm-app.crm-design-dark .crm-kb-mini-table {
    background: transparent !important;
    color: var(--crm-dark-text, #e5e7eb) !important;
}

.crm-app.crm-design-dark .crm-kb-mini-table th,
.crm-app.crm-design-dark .crm-kb-mini-table td {
    background: transparent !important;
    color: var(--crm-dark-text, #e5e7eb) !important;
    border-bottom-color: var(--crm-dark-border, rgba(148, 163, 184, .22)) !important;
}

.crm-app.crm-design-dark .crm-kb-mini-table th {
    background: rgba(15, 23, 42, .70) !important;
    color: var(--crm-dark-muted, #cbd5e1) !important;
}

.crm-app.crm-design-dark .crm-kb-mini-table tr:nth-child(even) td {
    background: rgba(15, 23, 42, .28) !important;
}

.crm-app.crm-design-dark .crm-kb-example-card-success {
    border-left-color: #22c55e !important;
}

.crm-app.crm-design-dark .crm-kb-example-card-danger {
    border-left-color: #ef4444 !important;
}

.crm-app.crm-design-dark .crm-kb-example-card-example {
    border-left-color: var(--crm-dark-accent, #f59e0b) !important;
}
