@font-face {
    font-family: "Inter";
    src: url("/fonts/inter/Inter-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter/Inter-SemiBold.ttf") format("truetype");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/inter/Inter-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --rz-primary: #0f766e;
    --rz-primary-light: #14b8a6;
    --rz-primary-lighter: #ccfbf1;
    --rz-primary-dark: #115e59;
    --rz-primary-darker: #134e4a;
    --rz-on-primary: #ffffff;
}

/* Use the active theme stylesheet so body-level dialogs and the standalone phone
   share the same readable selection colors as the main and admin layouts. */
html:has(link[rel="stylesheet"][href*="-dark-base.css"]) {
    --rz-text-selection-background-color: #bfdbfe;
    --rz-text-selection-color: #0f172a;
}

html:has(link[rel="stylesheet"][href*="-dark-base.css"]) ::selection {
    background-color: var(--rz-text-selection-background-color);
    color: var(--rz-text-selection-color);
    text-shadow: none;
}

html {
    font-size: 17px;
}

html, body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--rz-body-background-color);
}

a {
    color: #006bb7;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIga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MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Native links keep editor actions synchronous and allow browser tab controls. */
a.dme-editor-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 4px;
    color: var(--rz-text-color);
    text-decoration: none;
    cursor: pointer;
}
a.dme-editor-link:hover { background: var(--rz-base-200); color: var(--rz-text-color); }
a.dme-editor-link:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: 2px; }
a.dme-editor-link .rzi { font-size: 18px; }

/* Shared editable page size, including standalone pagers. */
.dme-paging-summary { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.dme-page-size { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; margin: 0; }
.dme-page-size input.rz-inputtext { width: 6rem; min-height: 1.8rem; height: 1.8rem; padding: .15rem .4rem; color: var(--rz-text-color); background: var(--rz-input-background-color); border: 1px solid var(--rz-input-border-color); }
.dme-page-size input:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: 1px; }

/* Shared map interaction controls. */
.dme-map-interactive { cursor: grab; touch-action: none; }
.dme-map-interactive.dragging { cursor: grabbing; }
.dme-map-zoom-controls { position: absolute; z-index: 5; top: .45rem; left: .45rem; display: grid; overflow: hidden; border: 1px solid #7f91a4; border-radius: .35rem; box-shadow: 0 .12rem .35rem #0005; }
.dme-map-zoom-controls button { display: grid; width: 1.85rem; height: 1.75rem; padding: 0; border: 0; color: #172b3e; background: #fffffff2; cursor: pointer; font: 800 1.15rem/1 Inter, sans-serif; place-items: center; }
.dme-map-zoom-controls button + button { border-top: 1px solid #a8b4c0; }
.dme-map-zoom-controls button:hover { background: #e6f0f8; }
.dme-map-zoom-controls button:focus-visible { position: relative; outline: 2px solid #245f98; outline-offset: -2px; }

/* Work tasks and the personal notification center use the active Radzen theme. */
.work-tasks { min-width: 0; }
/* Keep the task filters compact while the shared grid fills the remaining height. */
.app-content .catalog-page.work-tasks { gap: .62rem; }
.work-tasks-workspace { display: grid; grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr); gap: .65rem; align-items: stretch; }
.work-tasks .search-card, .work-tasks .results-card { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--rz-primary) 14%, var(--rz-base-300)); border-radius: .7rem; background: color-mix(in srgb, var(--rz-base-background-color) 94%, transparent); }
.work-tasks .search-card { display: flex; height: 100%; flex-direction: column; }
.work-tasks .search-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.work-tasks .panel-heading { display: flex; align-items: center; gap: .65rem; padding-bottom: .5rem; margin-bottom: .6rem; border-bottom: 1px solid var(--rz-base-300); }
.work-tasks .panel-heading strong, .work-tasks .panel-heading small { display: block; }
.work-tasks .panel-heading strong { font-size: .72rem; letter-spacing: .12em; }
.work-tasks .panel-heading small { font-size: .6rem; color: var(--rz-text-secondary-color); letter-spacing: .1em; }
.work-tasks .search-actions { display: flex; flex: 0 0 auto; gap: .65rem; margin-top: .65rem; padding-top: .55rem; padding-bottom: 5px; border-top: 1px solid var(--rz-base-300); }
.work-tasks .search-actions .rz-button { flex: 1; }
.work-tasks .search-clear-action { color: var(--rz-text-color) !important; border-color: color-mix(in srgb, var(--rz-text-color) 38%, var(--rz-base-400)) !important; background: color-mix(in srgb, var(--rz-base-background-color) 78%, var(--rz-base-200)) !important; }
.work-tasks .results-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding-bottom: .3rem; margin-bottom: .3rem; border-bottom: 1px solid var(--rz-base-300); font-size: .72rem; }
.work-tasks .results-toolbar span { color: var(--rz-text-secondary-color); }
@media (max-width: 900px) {
    .app-content .catalog-page.work-tasks > .work-tasks-workspace { grid-template-columns: minmax(0, 1fr); overflow: auto; }
    .work-tasks .search-card.rz-card { height: auto; min-height: 22rem; }
    .app-content .work-tasks .results-card.rz-card { height: 32rem; min-height: 32rem; }
}
.wt-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; }
.wt-toolbar select, .wt-toolbar input {
    color: var(--rz-text-color); background: var(--rz-input-background-color, var(--rz-base-background-color)); border: 1px solid var(--rz-input-border-color, var(--rz-base-500)); border-radius: 4px; padding: .35rem .5rem; min-height: 30px; font: inherit;
}
.wt-button, .wt-bell { font: inherit; cursor: pointer; color: var(--rz-text-color); background: var(--rz-base-background-color); border: 1px solid var(--rz-base-500); border-radius: 4px; padding: .3rem .6rem; }
.wt-button:hover, .wt-bell:hover { background: var(--rz-base-300); }
.wt-button.selected { background: var(--rz-primary); color: var(--rz-on-primary, white); border-color: var(--rz-primary); }
.wt-button:disabled { opacity: .5; cursor: default; }
.wt-button:focus-visible, .wt-bell:focus-visible, .wt-link:focus-visible, .wt-notice-link:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: 2px; }
.wt-caption { color: var(--rz-text-secondary-color); font-size: .8rem; margin: .35rem 0; }
.wt-error { color: var(--rz-on-danger, white); background: var(--rz-danger); border-radius: 4px; padding: .5rem; margin: .5rem 0; }
.wt-link { color: var(--rz-link-color, var(--rz-primary)); background: none; border: none; cursor: pointer; font: inherit; padding: 0; text-align: left; text-decoration: underline; }
.wt-status { color: var(--wt-status-color, var(--rz-text-color)); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.work-tasks-grid td.wt-status-cell { background-color: color-mix(in srgb, var(--wt-status-color) 12%, var(--rz-base-background-color)) !important; color: var(--wt-status-color) !important; }
.wt-status.assigned, .wt-status-cell.assigned { --wt-status-color: #426581; }
.wt-status.completed, .wt-status-cell.completed { --wt-status-color: #3f6b52; }
.wt-status.cancelled, .wt-status-cell.cancelled { --wt-status-color: #626874; }
.wt-status.overdue, .wt-status-cell.overdue { --wt-status-color: #99545d; }
.wt-status.completed-late, .wt-status-cell.completed-late { --wt-status-color: #806329; }
.theme-dark :is(.wt-status, .wt-status-cell).assigned { --wt-status-color: #a6bfd2; }
.theme-dark :is(.wt-status, .wt-status-cell).completed { --wt-status-color: #aac9b4; }
.theme-dark :is(.wt-status, .wt-status-cell).cancelled { --wt-status-color: #b8bdc7; }
.theme-dark :is(.wt-status, .wt-status-cell).overdue { --wt-status-color: #dbafb5; }
.theme-dark :is(.wt-status, .wt-status-cell).completed-late { --wt-status-color: #d6c294; }
.wt-editor .wt-form { border: 0; padding: 0; margin: .5rem 0; display: grid; gap: .5rem; }
.wt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.wt-notification-time { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.wt-checks { display: flex; flex-wrap: wrap; gap: .6rem; }
.wt-month-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; max-width: 34rem; }
.wt-executions { margin: .6rem 0; }
.wt-executions table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.wt-executions th, .wt-executions td { text-align: left; padding: .3rem; border-bottom: 1px solid var(--rz-base-300); }

.wt-checks label, .wt-editor .wt-check, .wt-check { display: flex; flex-direction: row; align-items: center; gap: .3rem; font-size: .85rem; }
.wt-checks input, .wt-check input { width: auto; }
.wt-history { padding-left: 1.2rem; font-size: .8rem; max-height: 240px; overflow: auto; }
.wt-history li { margin: .5rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-notifications { position: relative; }
.wt-bell { position: relative; display: flex; align-items: center; padding: .35rem; }
.wt-badge { position: absolute; right: -7px; top: -7px; border-radius: 12px; background: var(--rz-danger); color: white; padding: 1px 5px; font-size: 10px; }
.wt-inbox { position: absolute; z-index: 1600; right: 0; top: calc(100% + 10px); width: min(420px, 90vw); max-height: 70vh; overflow: auto; padding: .65rem; background: var(--rz-base-background-color); color: var(--rz-text-color); border: 1px solid var(--rz-base-500); border-radius: 6px; box-shadow: 0 6px 24px #0004; }
.wt-notice { display: flex; align-items: center; border-bottom: 1px solid var(--rz-base-400); padding: .4rem 0; gap: .4rem; }
.wt-notice.unread { border-left: 3px solid var(--rz-primary); padding-left: .4rem; }
.wt-notice-link { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; text-align: left; cursor: pointer; border: none; background: transparent; color: inherit; font: inherit; font-size: .85rem; padding: .25rem; overflow-wrap: anywhere; }
.wt-notice-link small { color: var(--rz-text-secondary-color); }
.wt-toast { position: fixed; right: 20px; bottom: 25px; z-index: 1800; width: min(360px, 90vw); display: flex; align-items: center; gap: .4rem; padding: .65rem; border: 1px solid var(--rz-primary); border-radius: 6px; color: var(--rz-text-color); background: var(--rz-base-background-color); box-shadow: 0 6px 24px #0004; }
@media (max-width: 600px) { .wt-fields { grid-template-columns: 1fr; } .wt-inbox { position: fixed; top: 65px; right: 5px; } }

:root { --communication-toolbar-width: 36px; }
.rz-layout.with-communication-toolbar { width: calc(100% - var(--communication-toolbar-width)); }
.communication-toolbar {
    position: fixed; top: 0; right: 0; bottom: 0; width: var(--communication-toolbar-width); height: 100dvh;
    box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 3px;
    background: var(--rz-base-background-color); color: var(--rz-text-color); border-left: 1px solid var(--rz-base-400); z-index: 1500;
}
.communication-button { display: grid; place-items: center; position: relative; width: 28px; height: 28px; padding: 0; border-radius: 5px; border: 1px solid transparent; background: transparent; color: var(--rz-text-color); cursor: pointer; }
.communication-button:hover { background: var(--rz-base-300); border-color: var(--rz-base-400); }
.communication-button[aria-expanded=true] { background: var(--rz-base-300); border-color: var(--rz-primary); }
.communication-button:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: 2px; }
.communication-toolbar .wt-badge { top: -3px; right: -3px; }
.communication-toolbar .wt-inbox { position: fixed; right: calc(var(--communication-toolbar-width) + 8px); top: 8px; width: min(420px, calc(100vw - var(--communication-toolbar-width) - 24px)); max-height: calc(100dvh - 32px); }
.communication-toolbar .wt-toast { right: calc(var(--communication-toolbar-width) + 12px); width: min(360px, calc(100vw - var(--communication-toolbar-width) - 36px)); }

.wt-time-zone, .wt-reminder-preview { padding: .4rem .5rem; border: 1px solid var(--rz-base-400); border-radius: 4px; background: var(--rz-base-background-color); color: var(--rz-text-color); font-size: .85rem; margin: .35rem 0; }

.work-tasks-grid .rz-group-header > .rz-column-picker { margin-inline-start: auto; }
.wt-editor .wt-form { max-width: 960px; }
.wt-editor .wt-history { max-height: none; }
a.wt-notice-link { text-decoration: none; }

/* Keep notification actions reachable while the inbox scrolls. */
.wt-inbox-header { position: sticky; top: -.65rem; z-index: 2; display: flex; align-items: center; gap: .5rem; padding: .5rem 0; background: var(--rz-base-background-color); border-bottom: 1px solid var(--rz-base-500); }
.wt-inbox-header { flex-wrap: wrap; gap: .3rem; }
.wt-inbox-header > strong { flex: 1; }
.wt-inbox-close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; color: var(--rz-text-color); background: transparent; border: 1px solid var(--rz-base-500); border-radius: 4px; cursor: pointer; }
.wt-inbox-close:hover { background: var(--rz-base-300); }
.wt-inbox-close:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: 2px; }
.wt-inbox .wt-notice { flex-wrap: wrap; }
.wt-inbox .wt-notice > .wt-notice-link { flex-basis: 100%; }
.wt-notice-actions { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; }
.wt-notice-actions a { text-decoration: none; }
.wt-status-form { display: grid; gap: .6rem; }

/* The related task block scrolls independently inside the shared editor layout. */
.related-work-tasks-card { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: .35rem; }
.related-work-tasks-grid-shell { flex: 1; min-height: 0; overflow: auto; }
.related-work-tasks-grid { height: 100%; }

/* Search validation occupies its own compact row without squeezing the actions. */
:has(> .dme-search-input-error) { flex-wrap: wrap; }
.dme-search-input-error { flex: 0 0 100%; grid-column: 1 / -1; order: 10; min-width: 0; }
.dme-search-input-error .rz-alert { margin: 0; }
.dme-search-dropdown > .rz-dropdown-clear-icon { opacity: 1; color: var(--rz-text-secondary-color); border-radius: .2rem; }
.dme-search-dropdown > .rz-dropdown-clear-icon:hover { background: var(--rz-base-200); }
.dme-search-dropdown > .rz-dropdown-clear-icon:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: 1px; }

.user-active-filter { display: flex; align-items: center; gap: .45rem; padding: .45rem .65rem; color: var(--rz-text-color); font-size: .8rem; cursor: pointer; border-top: 1px solid var(--rz-base-300); }
.user-active-filter input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--rz-primary); cursor: pointer; }
.user-active-filter:focus-within { outline: 2px solid var(--rz-primary); outline-offset: -2px; }

.dme-calendar-footer { display: flex; justify-content: flex-end; padding: .35rem; border-top: 1px solid var(--rz-base-300); }

.dme-voice-call { position:fixed; right:24px; bottom:84px; z-index:2100; width:min(360px,calc(100vw - 32px)); padding:14px; border:1px solid var(--rz-base-400); border-radius:10px; background:var(--rz-base-background-color,#fff); color:var(--rz-text-color,#111); box-shadow:0 6px 24px #0004; }
.dme-voice-call[hidden], .dme-voice-call button[hidden] { display:none; }
.dme-voice-label { font-weight:600; margin-bottom:10px; overflow-wrap:anywhere; }
.dme-voice-actions { display:flex; gap:8px; }
.dme-voice-actions button { padding:6px 10px; border:1px solid var(--rz-base-500); border-radius:5px; color:var(--rz-text-color,#111); background:color-mix(in srgb, var(--rz-text-color) 8%, var(--rz-base-background-color)); }
.dme-voice-actions [data-answer] { background:#157347; color:white; border-color:#157347; }
.dme-voice-actions [data-end] { background:#b42318; color:white; border-color:#b42318; }

.dme-voice-actions button:hover { filter:brightness(.9); }
.dme-voice-actions button:focus-visible { outline:2px solid var(--rz-primary); outline-offset:2px; }

/* Fax workspace fills the existing layout, preserving its shared page padding. */
.app-content:has(> .fax-navigation-layout) {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Keep the active check and check-number inputs prominent in both managers. */
body .panel-heading small.dme-check-emphasis,
body .dme-check-emphasis,
body input.dme-check-emphasis {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--rz-text-color) !important;
}

.panel-heading .dme-check-emphasis {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.wt-notice-group { margin-top: .35rem; border: 1px solid var(--rz-base-400); border-radius: 4px; overflow: hidden; }
.wt-group-heading { display: flex; align-items: center; gap: .3rem; width: 100%; padding: .4rem; border: 0; background: color-mix(in srgb, var(--rz-text-color) 7%, var(--rz-base-background-color)); color: var(--rz-text-color); cursor: pointer; text-align: left; font: inherit; font-size: .8rem; }
.wt-group-heading strong { flex: 1; }
.wt-group-heading span { font-size: .7rem; }
.wt-group-heading:hover { background: color-mix(in srgb, var(--rz-text-color) 13%, var(--rz-base-background-color)); }
.wt-group-heading:focus-visible { outline: 2px solid var(--rz-primary); outline-offset: -2px; }
.wt-notice-group .wt-notice, .wt-notice-group .wt-toolbar { margin-inline: .35rem; }
.wt-group-empty { margin: .5rem; font-size: .8rem; color: var(--rz-text-secondary-color); }
