/* VarioERP contractor visual refresh based on the provided SVG/icon brief. */
html,
html[data-vario-theme],
html body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

html body,
html[data-vario-theme] body {
    color: #0f1f3d !important;
    background: #f5f7fb !important;
}

html .vario-win-shell .vario-win-nav,
html[data-vario-theme] .vario-win-shell .vario-win-nav,
html .vario-win-shell .nav-scrollable,
html[data-vario-theme] .vario-win-shell .nav-scrollable,
html .vario-win-shell .vario-win-brand,
html[data-vario-theme] .vario-win-shell .vario-win-brand {
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.38), transparent 32%),
        linear-gradient(180deg, #061b3f 0%, #07295f 45%, #04152f 100%) !important;
    color: #ffffff !important;
    border-right-color: rgba(255, 255, 255, 0.08) !important;
}

html .vario-win-shell .vario-win-brand,
html[data-vario-theme] .vario-win-shell .vario-win-brand {
    height: 66px !important;
    padding: 0 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

html .vario-win-shell .vario-brand-mark,
html[data-vario-theme] .vario-win-shell .vario-brand-mark {
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    background: url("/icons/varioerp/varioerp-logo-mark.svg") center / contain no-repeat !important;
    box-shadow: 0 10px 24px rgba(18, 99, 241, 0.35) !important;
}

html .vario-win-shell .nav-link,
html[data-vario-theme] .vario-win-shell .nav-link,
html .vario-win-shell .nav-group-toggle,
html[data-vario-theme] .vario-win-shell .nav-group-toggle {
    box-sizing: border-box !important;
    width: calc(100% - 16px) !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    margin: 2px 8px !important;
    gap: 10px !important;
    border-radius: 11px !important;
    color: rgba(255, 255, 255, 0.84) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: background 160ms ease, color 160ms ease !important;
}

html .vario-win-shell .vario-win-tree,
html[data-vario-theme] .vario-win-shell .vario-win-tree {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

html .vario-win-shell .nav-subtree,
html[data-vario-theme] .vario-win-shell .nav-subtree {
    margin: 1px 0 4px !important;
    padding: 0 !important;
    border-left: 0 !important;
}

html .vario-win-shell .nav-subtree .nav-link,
html[data-vario-theme] .vario-win-shell .nav-subtree .nav-link {
    width: calc(100% - 16px) !important;
    margin: 1px 8px !important;
    padding-left: 34px !important;
}

html .vario-win-shell .nav-link:hover,
html[data-vario-theme] .vario-win-shell .nav-link:hover,
html .vario-win-shell .nav-group-toggle:hover,
html[data-vario-theme] .vario-win-shell .nav-group-toggle:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

html .vario-win-shell .nav-link.active,
html[data-vario-theme] .vario-win-shell .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1d6cff 0%, #0b54d8 100%) !important;
    border-radius: 11px !important;
    box-shadow: 0 10px 22px rgba(29, 108, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

/* This refresh owns application navigation only.  Scoping the icon metrics to
   the navigation surface keeps the shared NavIcon component reusable by modal
   section headings, document actions and other non-navigation controls. */
html .vario-win-shell > .vario-win-nav .nav-icon,
html[data-vario-theme] .vario-win-shell > .vario-win-nav .nav-icon {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    color: currentColor !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    opacity: 1 !important;
    shape-rendering: geometricPrecision !important;
}

html .vario-win-titlebar,
html[data-vario-theme] .vario-win-titlebar {
    height: 58px !important;
    min-height: 58px !important;
    padding: 8px 24px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid #e4eaf3 !important;
    backdrop-filter: blur(10px) !important;
}

html .vario-topbar-module-title h1,
html[data-vario-theme] .vario-topbar-module-title h1 {
    color: #071b3d !important;
    font-family: "Plus Jakarta Sans", Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: var(--vario-font-module-title-size) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.05 !important;
}

html .vario-topbar-module-title span,
html[data-vario-theme] .vario-topbar-module-title span {
    color: #64748b !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
}

html .vario-topbar-action-icon,
html[data-vario-theme] .vario-topbar-action-icon {
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #0f1f3d !important;
}

html .vario-directory-v2 .vario-contractors-search,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-search {
    margin: 14px 18px 10px !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e4eaf3 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(15, 31, 61, 0.06) !important;
    overflow: hidden !important;
}

html .vario-directory-v2 .vario-contractors-search .form-control,
html .vario-directory-v2 .vario-contractors-search .form-select,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-search .form-control,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-search .form-select {
    border: 1px solid #d8e2f0 !important;
    background: #fdfefe !important;
    color: #0f1f3d !important;
    box-shadow: inset 0 1px 0 rgba(15, 31, 61, 0.02) !important;
}

html .vario-directory-v2 .vario-contractors-search .form-control:focus,
html .vario-directory-v2 .vario-contractors-search .form-select:focus,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-search .form-control:focus,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-search .form-select:focus {
    border-color: #1263f1 !important;
    box-shadow: 0 0 0 3px rgba(18, 99, 241, 0.12) !important;
}

html .vario-directory-v2 .vario-contractors-filter-actions .btn,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-filter-actions .btn {
    gap: 6px !important;
    white-space: nowrap !important;
}

html .vario-directory-v2 .vario-contractors-add-button,
html .vario-directory-v2 .vario-contractors-search-button,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-add-button,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-search-button {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1d6cff, #0b54d8) !important;
    border: 0 !important;
    box-shadow: 0 8px 18px rgba(18, 99, 241, 0.22) !important;
}

html .vario-directory-v2 .vario-contractors-sync-button,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-sync-button {
    color: #1263f1 !important;
    background: #f8fbff !important;
    border: 1px solid #d8e2f0 !important;
}

.vario-action-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    flex: 0 0 14px;
    background: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.vario-action-icon.plus {
    mask-image: url("/icons/varioerp/plus.svg");
    -webkit-mask-image: url("/icons/varioerp/plus.svg");
}

.vario-action-icon.search {
    mask-image: url("/icons/varioerp/search.svg");
    -webkit-mask-image: url("/icons/varioerp/search.svg");
}

.vario-action-icon.sync {
    mask-image: url("/icons/varioerp/sync.svg");
    -webkit-mask-image: url("/icons/varioerp/sync.svg");
}

.vario-action-icon.edit {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
}

.vario-action-icon.more {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
    mask-image: url("/icons/varioerp/more-vertical.svg");
    -webkit-mask-image: url("/icons/varioerp/more-vertical.svg");
}

.vario-action-icon.save,
.vario-action-icon.cancel {
    position: relative;
    background: transparent;
    mask-image: none;
    -webkit-mask-image: none;
}

.vario-action-icon.save {
    border: 2px solid currentColor;
    border-radius: 3px;
}

.vario-action-icon.save::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 2px;
    width: 8px;
    height: 4px;
    border-radius: 0 0 2px 2px;
    background: currentColor;
}

.vario-action-icon.save::after {
    content: "";
    position: absolute;
    left: 4px;
    bottom: 2px;
    width: 6px;
    height: 4px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
}

.vario-action-icon.cancel::before,
.vario-action-icon.cancel::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 6px;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.vario-action-icon.cancel::before {
    transform: rotate(45deg);
}

.vario-action-icon.cancel::after {
    transform: rotate(-45deg);
}

html .vario-directory-v2 .vario-contractors-table-scroll,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-table-scroll {
    margin: 0 18px !important;
    background: #ffffff !important;
    border: 1px solid #e4eaf3 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(15, 31, 61, 0.05) !important;
}

html .vario-directory-v2 .vario-contractors-table thead th,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-table thead th {
    height: 26px !important;
    padding: 0 9px !important;
    color: #12315f !important;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%) !important;
    border-bottom: 1px solid #dbe5f2 !important;
    border-right: 1px solid #e4eaf3 !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
}

html .vario-directory-v2 .vario-contractors-table tbody td,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-table tbody td {
    height: 22px !important;
    max-height: 22px !important;
    padding: 1px 9px !important;
    color: #12315f !important;
    border-bottom: 1px solid #e9eef6 !important;
    border-right: 1px solid #edf2f8 !important;
    font-size: 11.2px !important;
    line-height: 15px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html .vario-directory-v2 .vario-contractors-table tbody td strong,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-table tbody td strong {
    color: #071b3d !important;
    font-weight: 800 !important;
}

html .vario-directory-v2 .vario-contractors-type-cell,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-type-cell {
    color: #1263f1 !important;
    font-weight: 800 !important;
}

html .vario-directory-v2 .vario-row-more-button,
html[data-vario-theme] .vario-directory-v2 .vario-row-more-button {
    width: 26px !important;
    height: 22px !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: #1263f1 !important;
    background: #f3f7ff !important;
}

html .vario-directory-v2 .vario-contractors-preview-pane,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-pane {
    margin: 10px 18px 18px !important;
    background: #ffffff !important;
    border: 1px solid #e4eaf3 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(15, 31, 61, 0.05) !important;
    overflow: hidden !important;
}

html .vario-directory-v2 .vario-contractors-preview-tabs,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-tabs {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border-bottom: 1px solid #e4eaf3 !important;
    background: #ffffff !important;
}

html .vario-directory-v2 .vario-contractors-preview-tabs button,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-tabs button {
    height: 44px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #475569 !important;
    font-weight: 800 !important;
}

html .vario-directory-v2 .vario-contractors-preview-tabs button.active,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-tabs button.active {
    color: #1263f1 !important;
    border-bottom-color: #1263f1 !important;
}

html .vario-directory-v2 .vario-contractors-loaded-summary,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-loaded-summary {
    margin-left: auto !important;
    padding: 0 12px !important;
}

html .vario-directory-v2 .vario-contractors-loaded-summary span,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-loaded-summary span {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 26px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    background: #f2f6ff !important;
    color: #52637a !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

html .vario-directory-v2 .vario-contractors-preview-empty,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-empty {
    min-height: 190px !important;
    color: #52637a !important;
}

html .vario-directory-v2 .vario-contractors-preview-empty-icon,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-empty-icon {
    width: 64px !important;
    height: 64px !important;
    border-radius: 18px !important;
    color: #1263f1 !important;
    background: linear-gradient(135deg, #eef4ff, #e7f0ff) !important;
}

html .vario-directory-v2 .vario-contractors-preview-empty-icon .nav-icon,
html[data-vario-theme] .vario-directory-v2 .vario-contractors-preview-empty-icon .nav-icon {
    width: 32px !important;
    height: 32px !important;
}
