:root {
  color-scheme: light;
  --ink: #17283d;
  --muted: #637386;
  --line: #d8e2ed;
  --surface: #ffffff;
  --canvas: #f3f6fa;
  --brand: #2d6eac;
  --brand-dark: #143f78;
  --brand-light: #639bd3;
  --accent: #e9f2fb;
  --soft: #f7f9fc;
  --red: #c84545;
  --green-dark: #0f6842;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
a { color: var(--brand); }
.topbar { min-height: 78px; padding: .45rem 5vw; display: flex; align-items: center; gap: 1.7rem; background: var(--brand-dark); color: white; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; color: white; text-decoration: none; }
.brand-logo { display: block; width: 72px; height: auto; filter: drop-shadow(0 4px 10px rgba(5, 24, 49, .18)); }
.topbar nav { display: flex; flex: 1; gap: 1.2rem; flex-wrap: wrap; }
.topbar nav a, .topbar .link-button { color: #f0f6fc; text-decoration: none; }
.container.has-section-navigation { display: grid; grid-template-columns: minmax(190px, 235px) minmax(0, 1fr); align-items: start; gap: 1.2rem; }
.app-content-main { min-width: 0; }
.section-navigation { position: sticky; z-index: 20; top: 1rem; }
.section-navigation-desktop { display: grid; gap: .55rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .97); box-shadow: 0 10px 28px rgba(20, 63, 120, .08); }
.section-navigation-desktop > strong { color: var(--brand-dark); font-size: 1.08rem; }
.section-navigation-desktop nav { display: grid; gap: .28rem; }
.section-navigation-desktop nav a { padding: .58rem .65rem; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 700; }
.section-navigation-desktop nav a:hover, .section-navigation-desktop nav a.is-active { background: var(--accent); color: var(--brand-dark); }
.section-navigation-desktop small { color: var(--muted); line-height: 1.35; }
.section-navigation-mobile { display: none; }
.admin-main-nav { align-items: center; gap: .35rem !important; }
.admin-main-nav > a, .admin-nav-menu > summary { border-radius: 8px; padding: .46rem .58rem; color: #f0f6fc; font-weight: 650; text-decoration: none; white-space: nowrap; }
.admin-main-nav > a:hover, .admin-main-nav > a.is-active, .admin-nav-menu > summary:hover, .admin-nav-menu[open] > summary { background: rgba(255, 255, 255, .13); color: white; }
.admin-nav-menu { position: relative; }
.admin-nav-menu > summary { cursor: pointer; list-style: none; }
.admin-nav-menu > summary::-webkit-details-marker { display: none; }
.admin-nav-menu > summary::after { content: " ⌄"; font-size: .85em; }
.admin-nav-dropdown { position: absolute; z-index: 50; top: calc(100% + .55rem); right: 0; display: grid; min-width: 220px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 16px 38px rgba(7, 27, 20, .22); }
.admin-nav-dropdown a { padding: .72rem .85rem; border-bottom: 1px solid var(--line); color: var(--ink) !important; font-weight: 650; text-decoration: none; }
.admin-nav-dropdown a:last-child { border-bottom: 0; }
.admin-nav-dropdown a:hover { background: var(--accent); color: var(--brand-dark) !important; }
.employee-main-nav { align-items: center; gap: .3rem !important; }
.employee-main-nav > a, .employee-nav-more > summary { border-radius: 8px; padding: .46rem .58rem; color: #f0f6fc; font-weight: 650; text-decoration: none; white-space: nowrap; }
.employee-main-nav > a:hover, .employee-main-nav > a.is-active, .employee-nav-more > summary:hover, .employee-nav-more[open] > summary { background: rgba(255, 255, 255, .13); color: white; }
.employee-nav-more { position: relative; }
.employee-nav-more > summary { cursor: pointer; list-style: none; }
.employee-nav-more > summary::-webkit-details-marker { display: none; }
.employee-nav-more > summary::after { content: " ⌄"; font-size: .85em; }
.employee-nav-more-menu { position: absolute; z-index: 40; top: calc(100% + .55rem); right: 0; display: grid; min-width: 250px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 16px 38px rgba(7, 27, 20, .22); }
.employee-nav-more-menu a { padding: .72rem .85rem; border-bottom: 1px solid var(--line); color: var(--ink) !important; font-weight: 650; text-decoration: none; }
.employee-nav-more-menu a:last-child { border-bottom: 0; }
.employee-nav-more-menu a:hover { background: var(--accent); color: var(--brand-dark) !important; }
.employee-mobile-nav, .admin-mobile-nav { display: none; }
.external-main-nav { align-items: center; gap: .35rem !important; }
.external-main-nav > a { border-radius: 8px; padding: .46rem .58rem; color: #f0f6fc; font-weight: 650; text-decoration: none; white-space: nowrap; }
.external-main-nav > a:hover, .external-main-nav > a.is-active { background: rgba(255, 255, 255, .13); color: white; }
.external-mobile-nav { display: none; }
.mobile-preview-intro { margin-bottom: 1.25rem; }
.mobile-preview-stage { display: grid; place-items: start center; overflow: auto; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, #eaf1f8, #dce8f4); padding: 2rem 1rem; }
.mobile-preview-device { position: relative; width: min(390px, 100%); height: min(844px, calc(100vh - 8rem)); min-height: 620px; overflow: hidden; border: 12px solid #10231f; border-radius: 42px; background: #10231f; box-shadow: 0 24px 55px rgba(15, 35, 60, .24); }
.mobile-preview-speaker { position: absolute; z-index: 2; top: 9px; left: 50%; width: 110px; height: 6px; border-radius: 999px; background: #70807c; transform: translateX(-50%); }
.mobile-preview-frame { width: 100%; height: 100%; border: 0; border-radius: 28px; background: white; }
.employee-perspective-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #ddb658; background: #fff0c7; padding: .72rem 5vw; color: #624400; }
.employee-perspective-banner form { margin: 0; }
.receipt-preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #89add1; background: #eaf3fb; padding: .72rem 5vw; color: var(--brand-dark); }
.receipt-preview-banner div { display: grid; gap: .12rem; }
.receipt-preview-banner span { color: #4b6178; font-size: .86rem; }
.nav-notification-badge { display: inline-grid; min-width: 1.35rem; height: 1.35rem; margin-left: .28rem; place-items: center; border-radius: 999px; background: #d83d49; padding: 0 .34rem; color: white; font-size: .72rem; font-weight: 850; vertical-align: middle; }
.container { width: min(1180px, 92vw); margin: 2.5rem auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
h1 { margin: .1rem 0; font-size: clamp(1.8rem, 3vw, 2.7rem); }
h2 { margin-top: 0; }
.eyebrow { margin: 0; color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }
.card, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; box-shadow: 0 12px 34px rgba(25, 50, 39, .06); margin-bottom: 1.4rem; }
.login-card { width: min(430px, 100%); margin: 9vh auto; padding: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.stat-card { display: flex; flex-direction: column; gap: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; color: var(--muted); text-decoration: none; }
.stat-card span { color: var(--ink); font-size: 2.1rem; font-weight: 800; }
.stat-card small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.employee-task-grid { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); }
.weekly-difference { color: inherit; font-style: normal; }
.traffic-green .weekly-difference { color: #168154; }
.traffic-red .weekly-difference { color: #b43636; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
button, .button { border: 0; border-radius: 10px; padding: .72rem 1rem; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; display: inline-block; }
button:disabled { cursor: not-allowed; opacity: .48; }
.primary { color: white; background: var(--brand); }
.primary:hover { background: var(--brand-dark); }
.secondary { color: var(--ink); background: var(--accent); }
.link-button { padding: 0; background: transparent; text-decoration: underline; font-weight: 600; }
.stacked-form { display: grid; gap: .7rem; }
.outlook-calendar-settings-card, .outlook-calendar-instructions, .outlook-calendar-security-card { display: grid; gap: 1rem; }
.outlook-calendar-settings-card h2, .outlook-calendar-instructions h2, .outlook-calendar-security-card h2 { margin: .2rem 0 .45rem; }
.outlook-calendar-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.outlook-calendar-copy-row input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.outlook-calendar-instructions ol { display: grid; gap: .55rem; margin: 0; padding-left: 1.35rem; }
.outlook-calendar-security-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-color: #efb0b0; }
@media (max-width: 640px) {
  .outlook-calendar-copy-row, .outlook-calendar-security-card { grid-template-columns: 1fr; }
  .outlook-calendar-copy-row button, .outlook-calendar-security-card button { width: 100%; }
}
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid p { margin: 0; }
.form-grid .full-width { grid-column: 1 / -1; }
.finance-heading { align-items: center; }
.finance-filter-card { padding-block: 1rem; }
.finance-filter-grid { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(160px, .6fr) auto; align-items: end; gap: .85rem; }
.finance-filter-action { padding-bottom: .02rem; }
.finance-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.finance-cash-flow-note { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; margin: 1rem 0; border: 1px solid #b9d5c7; border-radius: 16px; background: #f3faf6; padding: 1rem 1.15rem; }
.finance-cash-flow-note strong, .finance-cash-flow-note small { display: block; }
.finance-cash-flow-note strong { margin-top: .15rem; color: var(--ink); font-size: 1.18rem; }
.finance-cash-flow-note small { margin-top: .3rem; color: var(--muted); line-height: 1.35; }
.finance-cash-flow-note .eyebrow { margin: 0; }
.finance-cash-flow-arrow { color: #25845b; font-size: 2rem; font-weight: 900; }
.finance-start-note { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.finance-start-note div { display: grid; gap: .25rem; }
.finance-start-note span { color: var(--muted); line-height: 1.4; }
.finance-coverage-panel { display: grid; gap: 1rem; margin: 1rem 0 1.4rem; border: 1px solid #bdd7ca; border-radius: 18px; background: linear-gradient(135deg, #f6fbf8, #eef7f2); padding: 1.15rem; }
.finance-coverage-copy h2 { margin: .15rem 0 .35rem; }
.finance-coverage-copy p:last-child { max-width: 920px; margin: 0; color: var(--muted); line-height: 1.45; }
.finance-coverage-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.finance-coverage-stats .stat-card { margin: 0; background: white; }
.finance-target-card { border-top: 4px solid #2c9566; }
.finance-coverage-result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1rem; border-radius: 11px; background: white; padding: .8rem 1rem; }
.finance-coverage-result span { color: var(--muted); }
.finance-coverage-result strong { color: var(--ink); }
.finance-warning summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.finance-warning summary span { color: var(--muted); font-size: .88rem; font-weight: 500; }
.finance-warning-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: .5rem .9rem; margin-top: .85rem; border-top: 1px solid #c7dced; padding-top: .85rem; }
.finance-warning-list a { font-weight: 750; }
.finance-table-wrap { max-width: 100%; }
.finance-month-table { min-width: 1500px; }
.finance-month-table .is-current-finance-month td { background: #f1f7fd; }
.finance-month-table td small, #personalkosten td small, #weitere-kosten td small { display: block; margin-top: .25rem; color: var(--muted); line-height: 1.3; }
.finance-method-note { margin: 1rem 0 0; border-radius: 10px; background: var(--soft); padding: .8rem 1rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.compact-button { padding: .48rem .68rem; font-size: .86rem; white-space: nowrap; }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
input, select, textarea { width: 100%; border: 1px solid #b9c8d8; border-radius: 9px; background: white; padding: .7rem .75rem; font: inherit; }
input[type="checkbox"] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 3px solid #c9def3; border-color: var(--brand); }
.errorlist, .error { color: #9c2d2d; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: .7rem; align-items: center; white-space: nowrap; }
.message { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; background: var(--accent); }
.muted-line { margin: .35rem 0 0; color: var(--muted); }
.muted, .folder-privacy-note { color: var(--muted); }
.folder-privacy-note { margin: .45rem 0 0; }
.employee-master-actions { display: grid; gap: .45rem; min-width: 150px; }
.employee-master-actions .button { text-align: center; }
.employee-document-upload { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.25fr); gap: 1.5rem; }
.employee-document-upload h2, .employee-document-section h2 { margin-bottom: .35rem; }
.employee-document-list { display: grid; gap: .75rem; margin-top: 1rem; }
.employee-document-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); padding: .9rem 1rem; }
.employee-document-item.is-unread { border-color: #e6a817; background: #fff9e9; box-shadow: inset 5px 0 #e6a817; }
.employee-document-date { display: grid; gap: .18rem; }
.employee-document-date span, .employee-document-details p, .employee-document-details small { color: var(--muted); }
.employee-document-details h3, .employee-document-details p { margin: 0; }
.employee-document-details p { margin-top: .22rem; }
.employee-document-details .employee-document-note { margin-top: .5rem; color: var(--ink); }
.employee-document-details small { display: block; margin-top: .55rem; }
.employee-document-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
.employee-document-actions form { margin: 0; }
.employee-folder-breadcrumbs { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; padding: .8rem 1rem; }
.employee-folder-breadcrumbs a { font-weight: 750; }
.employee-folder-breadcrumbs span { color: var(--muted); }
.employee-folder-create { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.25fr); align-items: end; gap: 1.5rem; margin-bottom: 1rem; }
.employee-folder-create h2 { margin: .15rem 0 .35rem; }
.employee-folder-create-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: .55rem; }
.employee-folder-create-form label { grid-column: 1 / -1; }
.employee-folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem; margin-top: 1rem; }
.employee-folder-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .2rem .65rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: .85rem 1rem; color: var(--ink); text-decoration: none; }
.employee-folder-card:hover { border-color: var(--brand); background: var(--accent); }
.employee-folder-card strong { align-self: end; }
.employee-folder-card small { grid-column: 2; color: var(--muted); }
.employee-folder-icon { grid-row: 1 / span 2; font-size: 1.55rem; }
.employee-document-move-form { display: flex; align-items: center; gap: .4rem; }
.employee-document-move-form select { min-width: 150px; max-width: 230px; }
.case-document-upload-card { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(440px, 1.25fr); gap: 1.5rem; }
.case-document-upload-card h2, .case-document-library h2 { margin-bottom: .35rem; }
.case-document-example { margin-top: 1rem; border-radius: 9px; background: var(--accent); padding: .7rem .8rem; color: var(--brand-dark); }
.case-document-filter { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(170px, .8fr) minmax(170px, .8fr) auto; align-items: end; gap: .75rem; margin: 1rem 0 1.2rem; border-block: 1px solid var(--line); padding: 1rem 0; }
.case-document-filter .actions { flex-wrap: nowrap; }
.case-document-list { display: grid; gap: .8rem; }
.case-document-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); padding: .85rem 1rem; }
.case-document-item.is-unread { border-color: #e6a817; background: #fff9e9; box-shadow: inset 5px 0 #e6a817; }
.case-document-thumbnail, .case-document-filemark { display: grid; width: 96px; height: 76px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--brand-dark); font-size: .76rem; font-weight: 850; text-decoration: none; }
.case-document-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.case-document-details h3, .case-document-details p { margin: 0; }
.case-document-details p { margin-top: .42rem; color: var(--muted); }
.case-document-details small { display: block; margin-top: .5rem; color: var(--muted); }
.case-document-actions { display: flex; max-width: 290px; justify-content: flex-end; gap: .42rem; flex-wrap: wrap; }
.case-document-actions form { margin: 0; }
.case-new-document-badge, .case-new-document-note { display: inline-flex; width: max-content; align-items: center; border-radius: 999px; background: #fff0c7; padding: .2rem .48rem; color: #7a5505 !important; font-size: .68rem; font-weight: 850; vertical-align: middle; }
.case-new-document-note { margin-top: .35rem; }
.case-heading { align-items: center; }
.case-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.status-panel { display: flex; gap: .75rem; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 1rem 1.1rem; }
.status-panel div { display: grid; gap: .2rem; }
.status-panel span { color: var(--muted); font-size: .9rem; }
.status-panel-link { color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.status-panel-link:hover { border-color: var(--brand); box-shadow: 0 5px 18px rgba(45, 110, 172, .12); }
.traffic-dot { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; background: #94a3b8; }
.traffic-green .traffic-dot, .traffic-bg-green { background: #1c9b62; }
.traffic-yellow .traffic-dot, .traffic-bg-yellow { background: #e6a817; }
.traffic-red .traffic-dot, .traffic-bg-red { background: #c84545; }

/* Sichere Poststelle */
.secure-post-heading { align-items: center; }
.secure-post-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.secure-post-stats .stat-card { border-top: 4px solid var(--brand-light); }
.secure-post-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.secure-post-list { display: grid; gap: .75rem; margin-top: 1.1rem; }
.secure-post-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--line); border-left: 5px solid var(--brand-light); border-radius: 13px; background: var(--soft); padding: .95rem 1rem; }
.secure-post-row.is-new { border-left-color: #d83d49; background: #fffafa; }
.secure-post-row-main { min-width: 0; }
.secure-post-row-main h3, .secure-post-row-main p { margin: .35rem 0 0; }
.secure-post-row-main h3 a { color: var(--ink); text-decoration: none; }
.secure-post-row-main h3 a:hover { color: var(--brand); text-decoration: underline; }
.secure-post-row-main small, .secure-post-row-status time { color: var(--muted); }
.secure-post-row-status { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.status-badge { display: inline-flex; width: max-content; border-radius: 999px; padding: .28rem .58rem; font-size: .72rem; font-weight: 850; }
.secure-post-status-new { background: #fde7e7; color: #962f2f; }
.secure-post-status-assigned { background: #e2f5ea; color: #176541; }
.secure-post-status-archived { background: #e9edf2; color: #536171; }
.secure-post-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); align-items: start; gap: 1.2rem; }
.secure-post-detail-grid > * { min-width: 0; }
.secure-post-detail-grid > aside { position: sticky; top: 1rem; min-width: 0; max-width: 100%; }
.secure-post-detail-grid > aside > .card,
.secure-post-detail-grid [data-internal-assignment],
.secure-post-detail-grid [data-upload-destination-picker] { min-width: 0; max-width: 100%; }
.secure-post-detail-grid [data-upload-destination-picker] input,
.secure-post-detail-grid [data-upload-destination-picker] select,
.secure-post-detail-grid [data-internal-assignment] input,
.secure-post-detail-grid [data-internal-assignment] select,
.secure-post-detail-grid [data-internal-assignment] textarea { min-width: 0; max-width: 100%; }
.secure-post-detail-grid [data-internal-assignment] #id_documents,
.secure-post-detail-grid [data-internal-assignment] #id_documents > div,
.secure-post-detail-grid [data-internal-assignment] #id_documents label { min-width: 0; max-width: 100%; }
.secure-post-detail-grid [data-internal-assignment] #id_documents label { overflow-wrap: anywhere; word-break: break-word; }
.secure-post-facts { display: grid; gap: .7rem; margin: 1rem 0; }
.secure-post-facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: .8rem; border-bottom: 1px solid var(--line); padding-bottom: .65rem; }
.secure-post-facts dt { color: var(--muted); font-size: .78rem; font-weight: 800; }
.secure-post-facts dd { margin: 0; }
.secure-post-document-list { display: grid; gap: .65rem; margin-top: 1rem; }
.secure-post-document-list > article { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); padding: .75rem; }
.secure-post-document-list strong, .secure-post-document-list small { display: block; overflow-wrap: anywhere; }
.secure-post-document-list small { margin-top: .2rem; color: var(--muted); }
.secure-post-client-results { display: grid; max-height: 310px; overflow-y: auto; gap: .4rem; border-radius: 10px; }
.secure-post-client-option { display: grid; gap: .15rem; border: 1px solid var(--line); background: var(--soft); padding: .68rem .75rem; color: var(--ink); text-align: left; }
.secure-post-client-option:hover, .secure-post-client-option.is-selected { border-color: var(--brand); background: var(--accent); }
.secure-post-client-option small { color: var(--muted); font-weight: 500; }
.secure-post-selected-client { border: 1px solid #a9c4e0; border-radius: 9px; background: var(--accent); padding: .7rem .75rem; }
.secure-post-audit-list { display: grid; gap: .55rem; }
.secure-post-audit-list > div { display: grid; grid-template-columns: 125px minmax(0, 1fr) auto; gap: .6rem; border-bottom: 1px solid var(--line); padding: .55rem 0; font-size: .8rem; }
.secure-post-audit-list time, .secure-post-audit-list small { color: var(--muted); }
.secure-post-security-note { border: 1px solid #a9c4e0; border-radius: 10px; background: var(--accent); padding: .8rem 1rem; }
.secure-post-upload-form { width: min(780px, 100%); }
.external-main-nav { max-width: 620px; }
[hidden] { display: none !important; }

/* Gemeinsame Aktionen */
.activity-page-heading, .activity-detail-heading { align-items: center; }
.activity-board { display: grid; gap: 1rem; }
.activity-list-card { margin: 0; border-left: 5px solid var(--line); }
.activity-list-card.is-unread { border-left-color: var(--brand); box-shadow: 0 14px 36px rgba(45, 110, 172, .14); }
.activity-card-topline, .section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.activity-card-topline h2 { margin: .55rem 0 .15rem; }
.activity-card-topline h2 a { color: var(--ink); text-decoration: none; }
.activity-deadline { display: grid; flex: 0 0 auto; gap: .2rem; border-radius: 12px; background: var(--soft); padding: .75rem 1rem; text-align: right; }
.activity-deadline small { color: var(--muted); }
.activity-card-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0; }
.activity-card-facts > div { display: grid; gap: .2rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.activity-card-facts small { color: var(--muted); }
.activity-status, .activity-new-label { display: inline-flex; width: max-content; border-radius: 999px; background: var(--accent); padding: .32rem .6rem; color: var(--brand-dark); font-size: .75rem; font-weight: 850; }
.activity-status.status-confirmed { background: #dff4e8; color: #11623f; }
.activity-status.status-cancelled, .activity-status.status-closed { background: #f2e7e7; color: #8f2929; }
.activity-new-label { background: #d83d49; color: white; }
.activity-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.activity-summary-grid .stat-card { margin: 0; }
.activity-summary-grid .stat-card span { font-size: 1.28rem; }
.final-roster { border-top: 6px solid #d6a019; }
.final-roster.is-confirmed { border-top-color: #1c9b62; }
.roster-number { display: grid; min-width: 95px; border-radius: 14px; background: var(--accent); padding: .65rem 1rem; text-align: center; }
.roster-number strong { font-size: 1.75rem; }
.roster-number span { color: var(--muted); font-size: .76rem; }
.roster-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; margin-top: 1rem; }
.roster-list { display: grid; gap: .55rem; }
.roster-list article { display: flex; align-items: center; justify-content: space-between; gap: .7rem; border: 1px solid var(--line); border-radius: 11px; padding: .68rem .75rem; }
.roster-list article > div { display: grid; gap: .12rem; }
.roster-list small, .roster-list article > span, .roster-age-summary { color: var(--muted); font-size: .78rem; }
.checkbox-card-list ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.checkbox-card-list li label { display: flex; align-items: center; gap: .5rem; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: .62rem; }
.personal-client-grid, .employee-presence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.personal-client-card, .employee-presence-grid article { border: 1px solid var(--line); border-radius: 12px; background: white; padding: .75rem; }
.personal-client-card.is-participating { border-color: #1c9b62; box-shadow: inset 0 3px 0 #1c9b62; }
.personal-client-card header { display: flex; justify-content: space-between; gap: .6rem; }
.personal-client-card header span { color: var(--muted); font-size: .76rem; }
.availability-entry { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .45rem; border-radius: 7px; background: #e3f5eb; padding: .42rem .5rem; font-size: .73rem; }
.availability-entry.status-unavailable { background: #fdeaea; }
.availability-entry.is-global { border-left: 4px solid var(--danger); }
.availability-entry form { margin: 0; }
.availability-entry .link-button { color: inherit; font-size: .7rem; }
.availability-unknown { display: block; margin-top: .5rem; color: var(--muted); font-size: .78rem; }
.participation-check { display: block; margin-top: .55rem; color: #168154; font-size: .76rem; }
.availability-editor { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.availability-editor > summary { color: var(--brand); font-size: 1.05rem; font-weight: 850; cursor: pointer; }
.availability-calendar-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: .8rem; margin: 1rem 0; }
.availability-calendar-month { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.availability-calendar-month h3 { margin: 0; background: var(--accent); padding: .72rem; text-align: center; }
.availability-calendar-weekdays, .availability-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.availability-calendar-weekdays span { padding: .35rem .1rem; color: var(--muted); font-size: .66rem; font-weight: 800; text-align: center; }
.availability-calendar-day { min-height: 67px; border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; background: white; padding: .3rem; color: var(--ink); font-weight: 500; text-align: left; }
.availability-calendar-day:nth-child(7n) { border-right: 0; }
.availability-calendar-day strong, .availability-calendar-day small, .availability-calendar-day em { display: block; }
.availability-calendar-day small { margin-top: .2rem; color: var(--muted); font-size: .58rem; }
.availability-calendar-day em { color: #a43a3a; font-size: .56rem; font-style: normal; }
.availability-calendar-day.outside-month { opacity: .3; }
.availability-calendar-day.is-disabled { background: #f1f3f5; opacity: .28; }
.availability-calendar-day.is-selected { background: #dceafb; box-shadow: inset 0 0 0 2px var(--brand); }
.availability-form { margin-top: 1rem; }
.holiday-overlap-result { border: 1px solid var(--line); border-radius: 10px; background: #f4f7fb; padding: .8rem 1rem; color: var(--muted); font-weight: 750; }
.holiday-overlap-result.is-success { border-color: #87b89b; background: #e8f5ed; color: #24663f; }
.holiday-overlap-result.is-error { border-color: #e1a2a2; background: #fdeaea; color: #963737; }
.form-label { display: block; margin-bottom: .35rem; font-weight: 750; }
.responsible-person-display { border: 1px solid #9dbde0; border-radius: 10px; background: #eaf2fb; padding: .8rem 1rem; color: var(--ink); }
.responsible-person-display strong, .responsible-person-display small { display: block; }
.responsible-person-display small { margin-top: .2rem; color: var(--muted); }
.client-unavailability-hint { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; border: 1px solid #dfbf72; border-radius: 12px; background: #fff7dc; padding: .9rem 1rem; color: var(--ink); }
.client-unavailability-hint strong, .client-unavailability-hint span { display: block; }
.client-unavailability-hint span { margin-top: .2rem; color: var(--muted); }
.calendar-period-navigation { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 1rem 0; }
.client-unavailability-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.client-unavailability-list > article { border: 1px solid var(--line); border-radius: 12px; background: white; padding: .85rem; }
.client-unavailability-list > article > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--line); padding-bottom: .55rem; }
.client-unavailability-list > article > header small { display: block; margin-top: .15rem; color: var(--muted); }
.client-unavailability-list > article > header > span { border-radius: 999px; background: #e9f1fb; padding: .25rem .5rem; color: var(--brand); font-size: .72rem; font-weight: 800; }
.client-unavailability-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .55rem; border-radius: 8px; background: #fdeaea; padding: .55rem .65rem; font-size: .8rem; }
.client-unavailability-row form { margin: 0; }
.employee-presence-grid article { display: grid; gap: .2rem; border-top-width: 4px; }
.employee-presence-grid article span, .employee-presence-grid article small { color: var(--muted); font-size: .75rem; }
.employee-presence-grid .presence-free { border-top-color: #1c9b62; }
.employee-presence-grid .presence-busy { border-top-color: #d6a019; }
.employee-presence-grid .presence-away { border-top-color: #c84545; }
.activity-comment-list { display: grid; gap: .7rem; margin-top: 1.2rem; }
.activity-comment-list article { border-left: 4px solid var(--brand-light); border-radius: 8px; background: var(--soft); padding: .75rem 1rem; }
.activity-comment-list article header { display: flex; justify-content: space-between; gap: .6rem; }
.activity-comment-list time { color: var(--muted); font-size: .75rem; }
.activity-comment-list p { margin-bottom: 0; }
.activity-information-card { border-top: 5px solid var(--brand); }
.activity-information-links { display: grid; gap: .65rem; margin-top: 1rem; }
.activity-information-links article { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: .8rem .9rem; }
.activity-information-links article > div:first-child { display: grid; min-width: 0; gap: .2rem; }
.activity-information-links a:not(.button) { overflow: hidden; color: var(--brand); text-overflow: ellipsis; white-space: nowrap; }
.activity-information-links small, .activity-information-gallery small { color: var(--muted); font-size: .75rem; }
.activity-information-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem; margin-top: 1rem; }
.activity-information-gallery article { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); }
.activity-information-gallery article > a { display: block; background: #e8edf2; }
.activity-information-gallery img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.activity-information-gallery article > div { display: grid; gap: .2rem; padding: .7rem .8rem; }
.activity-information-gallery article > .actions { display: flex; padding-top: 0; }
.activity-information-gallery .actions form, .activity-information-links .actions form { margin: 0; }
.activity-information-add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.activity-information-add-grid details { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: .8rem .9rem; }
.activity-information-add-grid summary { color: var(--brand-dark); font-weight: 850; cursor: pointer; }
.activity-information-add-grid form { margin-top: .85rem; }
.finalize-activity-card { border-top: 5px solid var(--brand); }

/* Literatursammlung */
.library-page-heading, .library-detail-heading { align-items: center; }
.library-reading-count { border-radius: 999px; background: #d83d49; padding: .5rem .75rem; color: white; font-size: .82rem; font-weight: 850; }
.library-reading-list { border-top: 5px solid #d6a019; }
.library-reading-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; margin-top: 1rem; }
.library-reading-grid article { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid #dfbf72; border-radius: 12px; background: #fff8e2; padding: .85rem; }
.library-reading-grid article.is-opened { border-color: var(--line); background: var(--soft); }
.library-reading-grid article > div { display: grid; gap: .25rem; }
.library-reading-grid h3, .library-reading-grid p { margin: 0; }
.library-reading-grid small { color: var(--muted); }
.library-layout { display: grid; grid-template-columns: minmax(240px, 310px) minmax(0, 1fr); align-items: start; gap: 1.2rem; }
.library-global-search { margin-bottom: 1.2rem; }
.library-folder-admin { margin: .9rem 0 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.library-folder-admin > summary { padding: .75rem .9rem; cursor: pointer; color: var(--brand-dark); font-weight: 800; }
.library-folder-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 0 .9rem .9rem; }
.library-folder-delete { padding: .8rem; border: 1px solid #ecd2d2; border-radius: 10px; background: #fffafa; }
.library-folders { position: sticky; top: 1rem; }
.library-folder-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.library-folder-heading h2 { margin: 0; }
.library-collapse-folders { border: 0; background: transparent; padding: .2rem; color: var(--brand); font-size: .75rem; font-weight: 800; cursor: pointer; }
.library-folders nav { display: grid; gap: .35rem; margin-top: .9rem; }
.library-folder-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; margin-left: calc(var(--folder-depth, 0) * .8rem); }
.library-folder-row[hidden] { display: none; }
.library-folder-toggle, .library-folder-toggle-placeholder { display: grid; width: 26px; height: 32px; place-items: center; }
.library-folder-toggle { border: 0; border-radius: 7px; background: transparent; color: var(--brand); cursor: pointer; }
.library-folder-toggle:hover { background: var(--soft); }
.library-folder-toggle span { font-size: 1.35rem; line-height: 1; transition: transform .15s ease; }
.library-folder-toggle[aria-expanded="true"] span { transform: rotate(90deg); }
.library-folder-row > a { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .7rem; border: 1px solid transparent; border-radius: 9px; padding: .65rem .7rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.library-folder-row > a:hover { background: var(--soft); }
.library-folder-row > a.is-active { border-color: #9dbde0; background: var(--accent); color: var(--brand-dark); }
.library-folder-row > a > span { overflow: hidden; text-overflow: ellipsis; }
.library-folder-row > a small { display: grid; min-width: max-content; min-height: 25px; place-items: center; border-radius: 999px; background: white; padding: .2rem .45rem; color: var(--muted); font-size: .68rem; }
.library-create-folder { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .85rem; }
.library-create-folder > summary { color: var(--brand); font-weight: 850; cursor: pointer; }
.library-create-folder form { margin-top: .8rem; }
.library-create-folder button { width: 100%; }
.library-main { min-width: 0; }
.library-upload-card details > summary { color: var(--brand); font-size: 1.05rem; font-weight: 850; cursor: pointer; }
.library-upload-card details > p { margin-bottom: 1rem; }
.library-breadcrumb { display: flex; align-items: center; gap: .35rem; margin-bottom: .8rem; color: var(--muted); font-size: .86rem; flex-wrap: wrap; }
.library-breadcrumb a { color: var(--brand); }
.library-child-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .65rem; margin: 1rem 0; }
.library-child-folders a { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .1rem .55rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); padding: .7rem .8rem; color: var(--ink); text-decoration: none; }
.library-child-folders a:hover { border-color: #9dbde0; background: var(--accent); }
.library-child-folders a > span { grid-row: 1 / 3; font-size: 1.5rem; }
.library-child-folders small { color: var(--muted); }
.library-search-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; align-items: end; gap: .8rem; margin: 1rem 0; border-block: 1px solid var(--line); padding: .9rem 0; }
.library-search-form input { width: 100%; }
.library-search-feedback { display: grid; gap: .15rem; min-width: 190px; }
.library-search-feedback small { color: var(--muted); }
.library-document-list { display: grid; gap: .75rem; }
.library-document-list article[hidden] { display: none; }
.library-document-list > article { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: .9rem; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); padding: .8rem; }
.library-document-list > article.library-folder-entry { border-color: #b9cfe4; background: #f3f8fc; }
.library-document-thumbnail, .library-document-filemark, .library-folder-entry-mark { display: grid; width: 86px; height: 70px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--brand); font-size: .8rem; font-weight: 900; text-decoration: none; }
.library-folder-entry-mark { border-color: #b9cfe4; background: #e9f2fa; font-size: 1.75rem; }
.library-document-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.library-document-details { min-width: 0; }
.library-document-details h3, .library-document-details p { margin: 0; }
.library-document-details > .status-badge { display: inline-flex; margin-bottom: .35rem; }
.library-document-details h3 a { color: var(--ink); text-decoration: none; }
.library-document-details h3 a:hover { color: var(--brand); text-decoration: underline; }
.library-document-details p { margin-top: .3rem; color: var(--muted); }
.library-document-details small { display: block; overflow: hidden; margin-top: .35rem; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.library-document-actions { display: flex; max-width: 290px; justify-content: flex-end; gap: .42rem; flex-wrap: wrap; }
.library-document-actions form { margin: 0; }
.library-own-invitation, .library-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.library-own-invitation { border-left: 6px solid #d6a019; }
.library-own-invitation.is-completed { border-left-color: #1c9b62; }
.library-own-invitation p { margin-bottom: 0; }
.library-preview-card { overflow: hidden; }
.library-document-preview { display: block; width: 100%; height: min(72vh, 900px); margin-top: 1rem; border: 1px solid var(--line); border-radius: 11px; background: white; }
.library-large-image { display: block; margin-top: 1rem; text-align: center; }
.library-large-image img { max-width: 100%; max-height: 75vh; border-radius: 11px; box-shadow: 0 8px 26px rgba(20, 63, 120, .12); }
.library-no-preview { display: grid; max-width: 540px; justify-items: start; gap: .8rem; margin: 2rem auto 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); padding: 1.4rem; }
.library-no-preview strong { font-size: 1.6rem; color: var(--brand); }
.library-no-preview p { margin: 0; }
.library-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.library-invite-card .checkbox-card-list ul { max-height: 360px; overflow-y: auto; }
.library-invitation-status > div { display: grid; gap: .55rem; }
.library-invitation-status article { display: flex; align-items: center; justify-content: space-between; gap: .7rem; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .75rem; }
.library-invitation-status article > div { display: grid; gap: .15rem; }
.library-invitation-status small { color: var(--muted); }
.library-invitation-status .status-badge.is-completed { background: #dff4e8; color: #11623f; }
.library-danger-zone { border-color: #e1a2a2; }
.traffic-label { display: inline-flex; align-items: center; gap: .4rem; min-width: 150px; font-size: .82rem; }
.traffic-link { color: var(--ink); text-decoration: none; }
.traffic-link:hover { color: var(--brand); text-decoration: underline; }
.planning-key { display: flex; gap: 1rem 2rem; flex-wrap: wrap; padding-block: .9rem; color: var(--muted); }
.fls-planning-wrap { max-width: 100%; }
.fls-planning-table { min-width: 2430px; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.fls-planning-table th, .fls-planning-table td { padding: .65rem .7rem; vertical-align: middle; white-space: nowrap; }
.fls-planning-table thead th { position: sticky; top: 0; z-index: 4; background: #f7faf8; }
.fls-planning-table .sticky-employee { position: sticky; left: 0; min-width: 165px; max-width: 165px; z-index: 3; background: white; }
.fls-planning-table .sticky-office { position: sticky; left: 165px; min-width: 105px; max-width: 105px; z-index: 3; background: white; }
.fls-planning-table .sticky-client { position: sticky; left: 270px; min-width: 190px; max-width: 190px; z-index: 3; background: white; box-shadow: 8px 0 12px -12px rgba(19, 33, 27, .45); }
.fls-planning-table thead .sticky-employee, .fls-planning-table thead .sticky-office, .fls-planning-table thead .sticky-client { z-index: 6; background: #f7faf8; }
.planning-group-row td { position: sticky; left: 0; z-index: 2; background: var(--accent); color: var(--brand-dark); font-weight: 800; font-size: .95rem; }
.month-heading { min-width: 105px; text-align: center; }
.fls-month-cell { min-width: 105px; padding: .35rem !important; text-align: center; }
.fls-month-cell > a, .fls-month-cell > div { min-height: 62px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; align-content: center; gap: .05rem; padding: .35rem .3rem; color: var(--ink); text-decoration: none; }
.fls-month-cell > a:hover { border-color: var(--brand); background: var(--accent); }
.fls-month-cell strong { font-size: 1rem; }
.fls-month-cell span, .fls-month-cell small { color: var(--muted); font-size: .69rem; }
.fls-month-cell .empty-plan { color: var(--brand); }
.fls-month-cell.is-current-month { background: #edf4fb; }
.compact-signal { min-width: 92px; }
.year-navigation { justify-content: flex-end; }
.dashboard-tabs { display: flex; gap: .35rem; margin: -0.45rem 0 1.4rem; border-bottom: 1px solid var(--line); }
.dashboard-tabs a { padding: .75rem 1rem; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 750; text-decoration: none; }
.dashboard-tabs a:hover, .dashboard-tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

.admin-calendar-page-heading { align-items: end; }
.admin-calendar-stats { margin-bottom: 1.5rem; }
.admin-own-calendar-card, .admin-todo-card { margin-top: 1.5rem; }
.admin-leadership-cover-card { margin-top: 1rem; }
.admin-leadership-cover-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .65rem; }
.admin-leadership-cover-list article { display: flex; align-items: center; justify-content: space-between; gap: .9rem; border: 1px solid #d8e0e8; border-left: 4px solid var(--brand); border-radius: 11px; background: #f7f9fb; padding: .75rem .85rem; }
.admin-leadership-cover-list article > div { display: grid; gap: .12rem; }
.admin-leadership-cover-list article span { color: var(--muted); font-size: .74rem; }
.admin-leadership-cover-person { white-space: nowrap; }
.admin-own-calendar-layout { align-items: start; }
.admin-calendar-event-form > div { margin-bottom: .85rem; }
.admin-calendar-event-form select[multiple] { min-height: 10rem; }
.admin-calendar-delete-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.admin-event-responses { display: grid; gap: .65rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.admin-event-responses h4 { margin: .12rem 0 0; }
.admin-event-response-list { display: grid; gap: .45rem; }
.admin-event-response-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .55rem; align-items: center; border: 1px solid var(--line); border-left: 4px solid #d99a18; border-radius: 9px; background: #fffaf0; padding: .55rem .65rem; }
.admin-event-response-list article.response-accepted { border-left-color: #1c9b62; background: #f2fbf6; }
.admin-event-response-list article.response-declined { border-left-color: var(--red); background: #fff5f4; }
.admin-event-response-list article > span { border-radius: 999px; background: rgba(255, 255, 255, .72); padding: .15rem .42rem; color: var(--muted); font-size: .68rem; font-weight: 850; }
.admin-event-response-list article.response-accepted > span { color: var(--green-dark); }
.admin-event-response-list article.response-declined > span { color: var(--red); }
.admin-event-response-list article > small { grid-column: 1 / -1; color: var(--muted); font-size: .66rem; }
.admin-month-calendar .employee-calendar-event.kind-team { border-left-color: #2563eb; background: #e8f0ff; }
.admin-month-calendar .employee-calendar-event.kind-administration { border-left-color: #7c3aed; background: #f2ebff; }
.admin-month-calendar .employee-calendar-event.kind-reminder { border-left-color: #d97706; background: #fff3d6; }
.admin-month-calendar .employee-calendar-event.kind-blocker { border-left-color: #667085; background: #edf0f2; }
.calendar-day-empty { display: block; min-height: 1px; }
.admin-todo-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.8fr); gap: 1.5rem; align-items: start; }
.admin-todo-entry-panel { padding: 1.15rem; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.admin-todo-entry-panel form > div { margin-bottom: .8rem; }
.admin-todo-board { min-width: 0; }
.admin-todo-board-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.admin-todo-board-heading h3 { margin: 0; }
.admin-todo-list { display: grid; gap: .75rem; margin-top: 1rem; }
.admin-todo-item { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-left: 5px solid #98a2b3; border-radius: 14px; background: white; }
.admin-todo-item.priority-high { border-left-color: var(--red); }
.admin-todo-item.priority-low { border-left-color: #6b8e7e; }
.admin-todo-item.is-overdue { background: #fff4f3; }
.admin-todo-item.is-due-today { background: #fff9e8; }
.admin-todo-main { display: flex; gap: .8rem; align-items: flex-start; min-width: 0; }
.admin-todo-main > div { display: grid; gap: .25rem; }
.admin-todo-main p { margin: .25rem 0 0; color: var(--muted); }
.admin-todo-actions { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: flex-end; align-items: center; }
.admin-todo-actions form { display: flex; gap: .45rem; }
.status-badge.priority-high { background: #fee4e2; color: #b42318; }
.status-badge.priority-normal { background: #e6f4ee; color: var(--green-dark); }
.status-badge.priority-low { background: #eef1f0; color: #475467; }
.admin-completed-todos { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.admin-completed-todos summary { cursor: pointer; font-weight: 800; }
.admin-completed-todos > div { display: grid; gap: .55rem; margin-top: .75rem; }
.admin-completed-todos article { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .75rem; border-radius: 12px; background: var(--soft); }
.admin-completed-todos article > div { display: grid; gap: .15rem; }

@media (max-width: 900px) {
  .admin-todo-layout { grid-template-columns: 1fr; }
  .admin-todo-item { flex-direction: column; }
  .admin-todo-actions { justify-content: flex-start; }
}

.personal-todo-heading { align-items: center; }
.personal-todo-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.personal-todo-workspace { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.65fr); gap: 1.5rem; align-items: start; }
.personal-todo-form-panel { position: sticky; top: 1rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); }
.personal-todo-form-panel h2 { margin: .2rem 0 .5rem; }
.personal-todo-form-panel small { display: block; margin-top: .3rem; color: var(--muted); }
.personal-todo-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.personal-todo-board { display: grid; gap: 1rem; min-width: 0; }
.personal-todo-section { border: 1px solid var(--line); border-radius: 16px; padding: 1rem; background: #fff; }
.personal-todo-section.has-alert { border-color: #e7aaaa; background: #fffafa; }
.personal-todo-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.personal-todo-section-heading h2 { margin: .1rem 0 0; font-size: 1.25rem; }
.personal-todo-section-heading > span { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 999px; background: var(--accent); color: var(--brand-dark); font-weight: 850; }
.personal-todo-list { display: grid; gap: .7rem; margin-top: .8rem; }
.personal-todo-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-left: 5px solid #98a2b3; border-radius: 13px; padding: .9rem; background: #fff; }
.personal-todo-item.priority-high { border-left-color: var(--red); }
.personal-todo-item.priority-low { border-left-color: #6b8e7e; }
.personal-todo-item.is-overdue { background: #fff3f2; }
.personal-todo-item.is-due-today { background: #fff9e8; }
.personal-todo-copy { min-width: 0; }
.personal-todo-copy h3 { margin: .45rem 0 .25rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.personal-todo-copy p { margin: .55rem 0 0; color: var(--muted); }
.personal-todo-badges, .personal-todo-meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; }
.personal-todo-meta { color: var(--muted); font-size: .82rem; }
.status-badge.todo-category { background: var(--accent); color: var(--brand-dark); }
.status-badge.todo-progress { background: #e8f0ff; color: #2459a8; }
.todo-overdue-label { color: #a92f2f; }
.personal-todo-client { display: inline-block; margin-top: .45rem; font-weight: 700; }
.personal-todo-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; flex: 0 0 auto; }
.personal-todo-actions form { display: flex; gap: .4rem; align-items: center; }
.personal-completed-tasks { border-top: 1px solid var(--line); padding-top: 1rem; }
.personal-completed-tasks summary { cursor: pointer; font-weight: 800; }
.personal-completed-tasks > div { display: grid; gap: .55rem; margin-top: .75rem; }
.personal-completed-tasks article { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .75rem; border-radius: 12px; background: var(--soft); }
.personal-completed-tasks article > div { display: grid; gap: .15rem; }

@media (max-width: 900px) {
  .personal-todo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-todo-workspace { grid-template-columns: 1fr; }
  .personal-todo-form-panel { position: static; }
  .personal-todo-item { flex-direction: column; }
  .personal-todo-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .personal-todo-stats, .personal-todo-form-row { grid-template-columns: 1fr; }
  .personal-todo-actions, .personal-todo-actions form { width: 100%; }
  .personal-todo-actions .button, .personal-todo-actions button { text-align: center; }
}
.maintenance-main-nav { max-width: 700px; }
.maintenance-dashboard-heading { align-items: center; }
.maintenance-dashboard-tasks { margin-top: 1.4rem; }
.maintenance-task-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.maintenance-task-preview > a { display: grid; gap: .3rem; border: 1px solid var(--line); border-radius: 14px; padding: .9rem; color: var(--ink); text-decoration: none; background: var(--soft); }
.maintenance-task-preview > a:hover { border-color: var(--brand); background: var(--accent); }
.maintenance-task-preview .status-badge { justify-self: start; }
.maintenance-task-preview small { color: var(--muted); }
.maintenance-submission-layout, .maintenance-workspace { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.65fr); gap: 1.4rem; align-items: start; }
.maintenance-submission-layout > *, .maintenance-workspace > * { min-width: 0; }
.maintenance-form-card { position: sticky; top: 1rem; min-width: 0; max-width: 100%; }
.maintenance-form-card form, .maintenance-form-card form > div, .maintenance-form-row > div { min-width: 0; max-width: 100%; }
.maintenance-form-card input, .maintenance-form-card select, .maintenance-form-card textarea { min-width: 0; max-width: 100%; }
.maintenance-form-card h2 { margin: .2rem 0 .6rem; }
.maintenance-form-card small { display: block; margin-top: .3rem; color: var(--muted); }
.maintenance-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.maintenance-board { display: grid; gap: 1.2rem; min-width: 0; }
.maintenance-section { margin: 0; }
.maintenance-section.has-alert { border-color: #e5b948; box-shadow: 0 12px 34px rgba(202, 139, 0, .11); }
.maintenance-task-list { display: grid; gap: .75rem; margin-top: .85rem; }
.maintenance-task-card { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; min-width: 0; border: 1px solid var(--line); border-left: 5px solid #98a2b3; border-radius: 14px; padding: 1rem; background: white; }
.maintenance-task-card > * { min-width: 0; }
.maintenance-task-card.priority-high { border-left-color: var(--red); }
.maintenance-task-card.priority-low { border-left-color: #6b8e7e; }
.maintenance-task-card.is-overdue { background: #fff3f2; }
.maintenance-task-card.is-due-today { background: #fff9e8; }
.maintenance-task-copy { flex: 1 1 0; min-width: 0; max-width: 100%; }
.maintenance-task-copy h3, .maintenance-task-card h3 { margin: .45rem 0 .25rem; overflow-wrap: anywhere; }
.maintenance-task-copy p, .maintenance-task-card p { margin: .55rem 0; color: var(--muted); overflow-wrap: anywhere; word-break: break-word; }
.maintenance-task-copy > small, .maintenance-task-card > div > small { color: var(--muted); }
.maintenance-reference-links { display: flex; flex-wrap: wrap; gap: .45rem; margin: .6rem 0; }
.maintenance-reference-link { width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-location { display: inline-block; color: var(--brand-dark); }
.maintenance-task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; flex: 0 1 330px; min-width: 0; max-width: 100%; }
.maintenance-task-actions form { display: flex; gap: .45rem; align-items: center; }
.maintenance-quick-assign { display: grid !important; grid-template-columns: 1fr auto; width: 100%; }
.maintenance-quick-assign label { grid-column: 1 / -1; font-size: .82rem; }
.maintenance-quick-assign select { min-width: 0; }
.maintenance-quick-assign select, .maintenance-quick-assign button { width: 100%; max-width: 100%; }
.maintenance-quick-assign button { white-space: normal; }
.maintenance-kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin: .7rem 0 1rem; }
.maintenance-kind-switch a { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; text-align: center; color: var(--brand-dark); font-weight: 800; text-decoration: none; background: var(--soft); }
.maintenance-kind-switch a.is-active { border-color: var(--brand); color: #fff; background: var(--brand); }
.status-badge.maintenance-kind-material { background: #fff2cc; color: #805b00; }
.status-badge.maintenance-kind-repair { background: #e7f0fb; color: var(--brand-dark); }
.status-badge.maintenance-assignee-badge { border: 1px solid #8bc7a8; background: #dff4e8; color: #11623f; }
.maintenance-assignment-line { display: block; margin-top: .45rem; }
.maintenance-assignee-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .65rem; margin: .85rem 0 1rem; }
.maintenance-assignee-overview > div { min-width: 0; padding: .75rem .85rem; border: 1px solid #acd7c2; border-radius: 12px; background: #f0faf5; }
.maintenance-assignee-overview span, .maintenance-assignment-card > span { display: block; color: #287257; font-size: .68rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.maintenance-assignee-overview strong, .maintenance-assignment-card > strong { display: block; margin-top: .15rem; overflow-wrap: anywhere; color: #103f30; font-size: 1rem; }
.maintenance-assignee-overview small, .maintenance-assignment-card > small { display: block; margin-top: .2rem; color: #526a61; }
.maintenance-assignment-card { width: fit-content; min-width: min(100%, 245px); max-width: 100%; margin: .65rem 0 .55rem; padding: .65rem .8rem; border: 1px solid #8bc7a8; border-left: 5px solid #2e8a64; border-radius: 11px; background: #e9f8f0; }
.maintenance-completed summary { cursor: pointer; font-weight: 800; }
.maintenance-own-suggestions { min-width: 0; }
.maintenance-conversation { flex: 1 0 100%; width: 100%; margin-top: .2rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.maintenance-conversation > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; color: var(--brand-dark); font-weight: 850; }
.maintenance-conversation > summary::marker { color: var(--brand); }
.maintenance-conversation-content { display: grid; gap: .8rem; margin-top: .8rem; }
.maintenance-conversation-messages { display: grid; gap: .55rem; max-height: 360px; overflow-y: auto; padding: .15rem; }
.maintenance-conversation-message { width: min(90%, 640px); padding: .7rem .8rem; border: 1px solid #d7e2eb; border-radius: 12px 12px 12px 4px; background: #f5f8fb; }
.maintenance-conversation-message.is-own { justify-self: end; border-color: #acd7c2; border-radius: 12px 12px 4px 12px; background: #edf8f2; }
.maintenance-conversation-message header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem .8rem; }
.maintenance-conversation-message header strong { color: var(--ink); font-size: .88rem; }
.maintenance-conversation-message time { color: var(--muted); font-size: .76rem; }
.maintenance-conversation-message p { margin: .35rem 0 0; color: var(--ink); }
.maintenance-conversation-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .55rem; }
.maintenance-conversation-form label { grid-column: 1 / -1; }
.maintenance-conversation-form textarea { min-width: 0; resize: vertical; }
.maintenance-conversation-form button { min-height: 46px; }
.maintenance-conversation-closed { margin: 0; padding: .65rem .75rem; border-radius: 10px; background: var(--soft); color: var(--muted); }
.maintenance-conversation-clear { justify-self: end; }
@media (max-width: 900px) {
  .maintenance-submission-layout, .maintenance-workspace { grid-template-columns: 1fr; }
  .maintenance-form-card { position: static; }
  .maintenance-task-card { flex-direction: column; }
  .maintenance-task-actions { width: 100%; flex-basis: auto; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .maintenance-form-row { grid-template-columns: 1fr; }
  .maintenance-quick-assign { grid-template-columns: 1fr; }
  .maintenance-quick-assign label { grid-column: 1; }
  .maintenance-task-actions form:not(.maintenance-quick-assign) { width: 100%; }
  .maintenance-conversation-form { grid-template-columns: 1fr; }
  .maintenance-conversation-form label { grid-column: 1; }
  .maintenance-conversation-form button { width: 100%; }
  .maintenance-conversation-message { width: 100%; }
}
.filter-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.filter-result-heading h2 { margin-bottom: 0; }
.client-search-filter { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.client-search-filter label { display: block; margin-bottom: .35rem; font-weight: 800; }
.client-search-filter input { width: 100%; }
.client-search-feedback { display: grid; gap: .15rem; min-width: 190px; }
.client-search-feedback small { color: var(--muted); }
.client-master-table { min-width: 1500px; }
.client-master-table thead > tr:first-child th { white-space: nowrap; }
.client-table-scrollbar-top {
  position: sticky;
  z-index: 45;
  top: 0;
  height: 19px;
  margin: 0 0 3px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7fafc;
  box-shadow: 0 3px 10px rgba(20, 63, 120, .08);
}
.client-table-scrollbar-top[hidden] { display: none; }
.client-table-scrollbar-top > div { height: 1px; }
.client-master-table-wrap { margin-top: 0; }
.client-column-filters th { padding: .55rem .4rem .7rem; vertical-align: top; background: #f4f7fb; }
.client-column-filters input, .client-column-filters select { width: 100%; min-width: 118px; padding: .58rem .62rem; border-radius: 9px; font-size: .82rem; font-weight: 600; }
.client-column-filters th:nth-child(3) input { min-width: 150px; }
.client-column-filters th:nth-child(4) input { min-width: 132px; }
.client-column-filters th:nth-child(8) input, .client-column-filters th:nth-child(10) input { min-width: 142px; }
.client-column-filters .compact-button { width: 100%; min-width: 130px; padding: .58rem .65rem; font-size: .78rem; }
.client-column-filters .compact-button:disabled { opacity: .45; cursor: default; }
.client-filter-panel { margin: 0 0 1rem; padding: 0; overflow: hidden; }
.client-filter-panel > summary { display: flex; align-items: baseline; gap: .7rem; padding: .85rem 1rem; cursor: pointer; font-weight: 850; list-style-position: inside; background: #f7fafc; }
.client-filter-panel > summary small { color: var(--muted); font-weight: 600; }
.client-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: 1rem 1rem .65rem; border-top: 1px solid var(--line); }
.client-filter-grid > div { min-width: 0; }
.client-filter-grid label { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .72rem; font-weight: 800; }
.client-filter-grid input, .client-filter-grid select { width: 100%; min-width: 0; }
.client-filter-actions { display: flex; justify-content: flex-end; padding: 0 1rem 1rem; }
.client-filter-actions button:disabled { opacity: .45; cursor: default; }
.client-master-list { display: grid; gap: .9rem; }
.client-master-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(23, 42, 63, .06); }
.client-master-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.05rem .9rem; }
.client-master-identity { min-width: 0; }
.client-master-kicker { display: block; margin-bottom: .18rem; color: var(--brand); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.client-master-identity h2 { margin: 0; overflow-wrap: anywhere; font-size: 1.18rem; }
.client-master-identity p { margin: .35rem 0 0; color: var(--muted); }
.client-master-card-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.client-master-card-actions .button { min-height: 38px; padding: .5rem .7rem; white-space: nowrap; }
.client-master-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #f7fafc; }
.client-master-detail { min-width: 0; padding: .8rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.client-master-detail:nth-child(3n) { border-right: 0; }
.client-master-detail:nth-last-child(-n + 3) { border-bottom: 0; }
.client-master-detail > span:first-child { display: block; margin-bottom: .38rem; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.client-master-detail > strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: .94rem; }
.client-master-detail > small { display: block; margin-top: .25rem; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.client-master-detail-important { background: #fff; }
.client-master-detail .traffic-label { width: fit-content; max-width: 100%; white-space: normal; }
@media (max-width: 980px) {
  .client-filter-grid, .client-master-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-master-card-heading { flex-direction: column; }
  .client-master-card-actions { justify-content: flex-start; width: 100%; }
  .client-master-detail:nth-child(3n) { border-right: 1px solid var(--line); }
  .client-master-detail:nth-child(2n) { border-right: 0; }
  .client-master-detail:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .client-master-detail:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 620px) {
  .client-filter-panel > summary { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .client-filter-grid, .client-master-detail-grid { grid-template-columns: 1fr; }
  .client-master-card-heading { padding: .9rem; }
  .client-master-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-master-card-actions .button { justify-content: center; text-align: center; white-space: normal; }
  .client-master-detail, .client-master-detail:nth-child(2n), .client-master-detail:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .client-master-detail:last-child { border-bottom: 0; }
}
.documentation-entry.is-historical { border-left-color: #7ea994; }
.employee-planning-wrap { margin-top: .4rem; }
.employee-planning-table { min-width: 680px; }
.employee-planning-table th, .employee-planning-table td { padding: .7rem .75rem; vertical-align: middle; white-space: nowrap; }
.employee-planning-table th:first-child, .employee-planning-table td:first-child { width: 40%; min-width: 220px; }
.employee-planning-summary th, .employee-planning-summary td { border-top: 1px solid var(--line); background: #f7faf8; }
.employee-planning-summary tr:first-child th, .employee-planning-summary tr:first-child td { border-top: 2px solid var(--brand); }
.employee-planning-summary small { display: block; margin-top: .12rem; color: var(--muted); font-size: .72rem; }
.planning-balance-green strong { color: var(--brand); }
.planning-balance-yellow strong { color: #9a6500; }
.planning-balance-red strong { color: #a72f2f; }
.employee-yearly-fls-card { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(190px, .8fr) minmax(170px, .7fr); gap: 1rem; align-items: center; margin-top: 1rem; padding-block: 1rem; }
.employee-yearly-fls-card h2 { margin: .12rem 0 0; }
.employee-yearly-fls-picker { margin: 0; font-size: .82rem; }
.employee-yearly-fls-picker select { margin-top: .35rem; }
.employee-yearly-fls-total { display: grid; gap: .2rem; border-left: 1px solid var(--line); padding-left: 1rem; }
.employee-yearly-fls-total span { color: var(--muted); font-size: .82rem; }
.employee-yearly-fls-total strong { font-size: 1.35rem; }
@media (max-width: 760px) {
  .employee-yearly-fls-card { grid-template-columns: 1fr; }
  .employee-yearly-fls-total { border-top: 1px solid var(--line); border-left: 0; padding-top: .8rem; padding-left: 0; }
}
.planning-calendar-section { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.planning-calendar-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 1rem; }
.planning-calendar-month { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.planning-calendar-month > header { display: flex; justify-content: space-between; gap: .6rem; background: var(--accent); padding: .75rem; }
.planning-calendar-month > header span { color: var(--muted); font-size: .78rem; }
.planning-calendar-weekdays, .planning-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.planning-calendar-weekdays span { padding: .35rem .1rem; color: var(--muted); font-size: .66rem; font-weight: 800; text-align: center; }
.planning-calendar-day { min-height: 54px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: .25rem; font-size: .7rem; }
.planning-calendar-day:nth-child(7n) { border-right: 0; }
.planning-calendar-day.outside-month { opacity: .25; }
.planning-calendar-day > span { color: var(--muted); }
.planning-calendar-day > strong { display: block; margin-top: .18rem; color: var(--brand); }
.planning-calendar-day > small { display: block; overflow: hidden; margin-top: .12rem; border-radius: 4px; background: #fdeaea; padding: .12rem; color: #8f2929; text-overflow: ellipsis; white-space: nowrap; }
.inline-fls-plan { width: 20%; min-width: 130px; }
.inline-fls-plan input { min-width: 105px; padding: .6rem .65rem; text-align: right; font-weight: 750; }
.inline-fls-plan input:placeholder-shown { border-style: dashed; border-color: #d9e0dc; background: #fafbfa; }
.inline-fls-plan input::placeholder { color: #b8c1bc; opacity: 1; font-style: italic; font-weight: 500; }
.planning-save-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem -1.4rem -1.4rem; padding: .9rem 1.4rem; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 20px rgba(19, 33, 27, .06); }
.planning-save-bar span { color: var(--muted); font-size: .86rem; }
.employee-preview-picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); align-items: end; gap: 1.5rem; }
.employee-preview-picker h2 { margin: .15rem 0 0; }
.preview-employee-form select { min-width: 230px; }
.employee-perspective-form { grid-column: 1 / -1; display: flex; align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.employee-perspective-form small, .employee-perspective-missing { color: var(--muted); }
.employee-perspective-missing { grid-column: 1 / -1; margin: 0; border-top: 1px solid var(--line); padding-top: 1rem; }
.employee-cases-wrap { margin-top: .4rem; }
.employee-cases-table { min-width: 1180px; font-size: .86rem; }
.employee-cases-table th, .employee-cases-table td { padding: .7rem .75rem; vertical-align: middle; white-space: nowrap; }
.employee-cases-table td small { display: block; margin-top: .22rem; color: var(--muted); font-size: .72rem; }
.employee-cases-table .employee-case-actions { min-width: 170px; }
.employee-case-action-list { align-items: flex-start; flex-direction: column; gap: .42rem; }
.employee-case-action-list .button { min-width: 140px; text-align: center; }
.employee-cases-table .employee-case-name { min-width: 180px; }
.case-date-edit { display: flex; align-items: baseline; gap: .35rem; width: max-content; margin-bottom: .35rem; color: var(--brand-dark); text-decoration: none; }
.case-date-edit span { border-radius: 999px; background: var(--accent); padding: .16rem .4rem; color: var(--brand); font-size: .68rem; font-weight: 850; letter-spacing: .04em; }
.case-date-edit em { color: var(--brand); font-size: .7rem; font-style: normal; font-weight: 750; }
.case-date-edit:hover strong, .case-date-edit:hover em { text-decoration: underline; }
.employee-cases-table .number-cell { text-align: right; }
.employee-cases-table .employee-case-open { white-space: nowrap; padding: .58rem .8rem; }
.employee-cases-heading-actions { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.weekly-case-summary { display: grid; min-width: 185px; gap: .08rem; border: 1px solid var(--line); border-top: 4px solid #94a3b8; border-radius: 11px; background: #fbfdfb; padding: .6rem .75rem; }
.weekly-case-summary.traffic-green { border-top-color: #1c9b62; }
.weekly-case-summary.traffic-red { border-top-color: #c84545; }
.weekly-case-summary span, .weekly-case-summary small { color: var(--muted); font-size: .7rem; }
.weekly-case-summary strong { font-size: 1.2rem; }
.weekly-case-summary em { color: inherit; font-style: normal; font-weight: 800; }
.weekly-case-summary.traffic-green em { color: #168154; }
.weekly-case-summary.traffic-red em { color: #b43636; }
.employee-calendar-layout { display: grid; grid-template-columns: minmax(285px, 340px) minmax(0, 1fr); align-items: start; gap: 1.1rem; }
.employee-calendar-simplified { display: flex; flex-direction: column; }
.employee-calendar-simplified > .section-heading { order: 0; }
.employee-calendar-simplified > .calendar-reminder-banner { order: 1; }
.employee-calendar-simplified > .calendar-workspace-controls { order: 2; }
.employee-calendar-simplified > .employee-calendar-layout { order: 3; grid-template-columns: minmax(0, 1fr); }
.employee-calendar-simplified > .calendar-team-comparison { order: 4; }
.employee-calendar-simplified > .team-vacation-planner { order: 5; }
.employee-calendar-simplified > .calendar-invitations { order: 6; }
.employee-calendar-simplified > .calendar-summary-grid { order: 7; }
.employee-calendar-simplified .employee-calendar-main { order: -1; }
.calendar-workspace-controls { display: grid; gap: .75rem; margin-bottom: 1rem; border: 1px solid #c8d9ea; border-radius: 14px; background: #f6faff; padding: .85rem 1rem; }
.calendar-workspace-primary, .calendar-workspace-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.calendar-workspace-primary > div { display: grid; gap: .1rem; }
.calendar-workspace-actions { justify-content: flex-start; }
.calendar-colleague-picker { position: relative; min-width: min(100%, 310px); }
.calendar-colleague-picker > summary { border: 1px solid var(--line); border-radius: 9px; background: white; padding: .62rem .75rem; color: var(--brand-dark); font-size: .78rem; font-weight: 850; cursor: pointer; list-style-position: inside; }
.calendar-colleague-picker[open] > summary { border-color: var(--brand); border-radius: 9px 9px 0 0; background: var(--accent); }
.calendar-colleague-picker > form { display: grid; gap: .6rem; border: 1px solid var(--brand); border-top: 0; border-radius: 0 0 11px 11px; background: white; padding: .8rem; }
.calendar-colleague-picker > form > label { margin: 0; }
.calendar-colleague-options { display: grid; max-height: 230px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: .3rem; }
.calendar-colleague-options label { display: flex; align-items: center; gap: .5rem; margin: 0; border-radius: 6px; padding: .42rem .45rem; font-size: .78rem; cursor: pointer; }
.calendar-colleague-options label:hover, .calendar-colleague-options label:has(input:checked) { background: var(--accent); }
.calendar-colleague-options input { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--brand); }
.calendar-colleague-picker small { color: var(--muted); font-size: .68rem; }
.calendar-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.calendar-summary-grid.is-month-only { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calendar-reminder-banner { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; border-left: 5px solid #d79a12; border-radius: 10px; background: #fff3ce; padding: .8rem 1rem; }
.calendar-reminder-banner span { color: #6f5514; }
.calendar-summary-grid > div { display: grid; gap: .18rem; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 12px; background: white; padding: .75rem; }
.calendar-summary-grid > div.traffic-red { border-top-color: #c84545; }
.calendar-summary-grid > div.traffic-green { border-top-color: #1c9b62; }
.calendar-summary-grid span, .calendar-summary-grid small { color: var(--muted); font-size: .76rem; }
.calendar-summary-grid strong { font-size: 1.35rem; }
.calendar-invitations { margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfb; padding: 1rem; }
.calendar-invitations h3 { margin: 0; }
.calendar-invitation-list { display: grid; gap: .6rem; margin-top: .75rem; }
.calendar-invitation-list article { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 10px; background: white; padding: .75rem; }
.calendar-invitation-list article > div { display: grid; gap: .15rem; }
.calendar-invitation-list article span, .calendar-invitation-list article small { color: var(--muted); }
.calendar-invitation-list form { display: flex; gap: .4rem; }
.team-vacation-planner { margin: 0 0 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: #f8fbff; padding: 1rem; }
.team-vacation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.team-vacation-heading h3 { margin: .12rem 0 .18rem; }
.team-vacation-privacy { flex: 0 0 auto; border: 1px solid #b9cee5; border-radius: 999px; background: #e8f2fc; padding: .3rem .55rem; color: var(--brand-dark); font-size: .7rem; font-weight: 850; }
.team-vacation-week-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.team-vacation-week { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.team-vacation-week > header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; background: var(--accent); padding: .62rem .72rem; }
.team-vacation-week > header span { color: var(--muted); font-size: .7rem; }
.team-vacation-week-days { display: grid; }
.team-vacation-week-day { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: start; gap: .55rem; min-height: 45px; border-top: 1px solid var(--line); padding: .45rem .65rem; }
.team-vacation-week-day:first-child { border-top: 0; }
.team-vacation-week-day.is-today { background: #edf4fb; box-shadow: inset 4px 0 0 var(--brand); }
.team-vacation-week-day > div:first-child { display: flex; align-items: baseline; gap: .35rem; }
.team-vacation-week-day > div:first-child span, .team-vacation-people small { color: var(--muted); font-size: .68rem; }
.team-vacation-people { display: flex; flex-wrap: wrap; gap: .25rem; }
.team-vacation-people > span { border-radius: 999px; background: #e6f1fb; padding: .18rem .42rem; color: var(--brand-dark); font-size: .68rem; font-weight: 750; }
.team-vacation-months { margin-top: .85rem; }
.team-vacation-months > summary { width: max-content; color: var(--brand-dark); font-weight: 850; cursor: pointer; }
.team-vacation-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .65rem; }
.team-vacation-month { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.team-vacation-month h4 { margin: 0; background: var(--accent); padding: .62rem .7rem; text-align: center; }
.team-vacation-month-weekdays, .team-vacation-month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.team-vacation-month-weekdays span { padding: .35rem .1rem; color: var(--muted); font-size: .6rem; font-weight: 850; text-align: center; }
.team-vacation-month-day { display: grid; align-content: start; gap: .12rem; min-width: 0; min-height: 62px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: .22rem; }
.team-vacation-month-day:last-child { border-right: 0; }
.team-vacation-month-day.outside-month { background: #f7f8f8; }
.team-vacation-month-day.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.team-vacation-month-day > strong { color: var(--muted); font-size: .62rem; }
.team-vacation-month-day > span { overflow: hidden; border-radius: 4px; background: #e6f1fb; padding: .1rem .16rem; color: var(--brand-dark); font-size: .52rem; font-weight: 750; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.calendar-invitee-options { overflow: auto; max-height: 13rem; border: 1px solid var(--line); border-radius: 9px; background: white; padding: .45rem .6rem; }
.calendar-invitee-options > div { display: grid; gap: .18rem; }
.calendar-invitee-options label { display: flex; align-items: center; gap: .5rem; margin: 0; border-radius: 6px; padding: .35rem .25rem; font-weight: 650; }
.calendar-invitee-options label:hover { background: var(--accent); }
.calendar-invitee-options label:has(input:checked) { background: #e6f1fb; color: var(--brand-dark); }
.calendar-invitee-options input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--brand); }
.calendar-course-clients-field { display: grid; gap: .45rem; }
.calendar-course-clients-field[hidden], .manage-calendar-course-field[hidden] { display: none; }
.calendar-course-client-options { overflow: auto; max-height: 17rem; border: 1px solid var(--line); border-radius: 9px; background: white; padding: .45rem .6rem; }
.calendar-course-client-options > div { display: grid; gap: .18rem; }
.calendar-course-client-options label { display: flex; align-items: center; gap: .5rem; margin: 0; border-radius: 6px; padding: .35rem .25rem; font-weight: 650; }
.calendar-course-client-options label:hover { background: var(--accent); }
.calendar-course-client-options input { width: auto; margin: 0; }
.calendar-course-client-count { color: var(--brand); font-weight: 800; }
.calendar-absence { display: block; overflow: hidden; margin-top: .2rem; border-radius: 4px; background: #fdeaea; padding: .14rem .25rem; color: #8f2929; font-size: .62rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.calendar-school-holidays { display: flex; flex-wrap: wrap; gap: .18rem; min-width: 0; }
.calendar-school-holidays:empty { display: none; }
.calendar-school-holiday { display: inline-flex; overflow: hidden; width: max-content; max-width: 100%; border: 1px solid #ccd7e3; border-radius: 999px; background: #f5f7fa; padding: .1rem .34rem; color: #64748b; font-size: .58rem; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.calendar-school-holiday.state-nrw { border-style: dashed; }
.calendar-leadership-vacations { display: flex; flex-wrap: wrap; gap: .18rem; min-width: 0; margin-top: .16rem; }
.calendar-leadership-vacations:empty { display: none; }
.calendar-leadership-vacation { display: inline-flex; align-items: center; gap: .25rem; overflow: hidden; width: max-content; max-width: 100%; border: 1px solid #d8e0e8; border-left: 3px solid #91a4b8; border-radius: 5px; background: #f6f8fa; padding: .1rem .3rem; color: #68788a; font-size: .58rem; font-weight: 760; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.calendar-leadership-vacation small { color: #778596; font-size: .54rem; font-weight: 650; }
.calendar-leadership-vacations.is-admin .calendar-leadership-vacation { display: grid; gap: .02rem; white-space: normal; }
.agenda-leadership-vacations { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .55rem; }
.calendar-entry-panel { border: 1px solid var(--line); border-radius: 14px; background: #fbfdfb; padding: 1rem; }
.calendar-entry-panel h3 { margin: .15rem 0 .9rem; }
.calendar-entry-collapsible { margin-top: 1rem; padding: 0; }
.calendar-entry-collapsible > summary { border-radius: 14px; background: var(--accent); padding: .85rem 1rem; color: var(--brand-dark); font-weight: 850; cursor: pointer; }
.calendar-entry-collapsible[open] > summary { border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.calendar-entry-content { max-width: 760px; padding: 1rem; }
.calendar-appointment-form { display: grid; gap: .8rem; }
.calendar-appointment-actions { align-items: stretch; }
.calendar-appointment-actions > * { flex: 1; text-align: center; }
.calendar-quota-field small, .confirmation-quota small { display: block; margin-top: .3rem; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.calendar-conflict-alert { display: grid; gap: .6rem; scroll-margin: 5rem 0; border: 1px solid #df9c1c; border-left: 5px solid #df9c1c; border-radius: 10px; background: #fff7df; padding: .8rem; }
.calendar-conflict-alert:focus { outline: 3px solid rgba(223, 156, 28, .28); outline-offset: 3px; }
.calendar-conflict-alert > strong { color: #7a5505; font-size: 1.05rem; }
.calendar-conflict-alert p, .calendar-conflict-alert ul { margin: 0; }
.calendar-conflict-alert ul { padding-left: 1.2rem; font-size: .86rem; }
.calendar-overlap-appointments { display: grid; gap: .45rem; margin: 0; border: 1px solid #d7aa51; border-radius: 10px; background: #fffdf6; padding: .7rem; }
.calendar-overlap-appointments legend { padding: 0 .25rem; color: #674700; font-weight: 850; }
.calendar-overlap-appointments .choice-row { align-items: flex-start; margin: 0; border-radius: 9px; background: #fff; padding: .55rem .62rem; }
.calendar-overlap-appointments .choice-row input { flex: 0 0 auto; margin-top: .12rem; }
.calendar-conflict-alert.is-being-changed { border-color: var(--line); border-left-color: var(--muted); background: #f6f8f7; opacity: .72; }
.calendar-alternatives { display: grid; gap: .35rem; border-top: 1px solid rgba(122, 85, 5, .2); padding-top: .6rem; }
.calendar-alternatives > span { color: #7a5505; font-size: .78rem; font-weight: 800; }
.calendar-alternative { border: 1px solid #e5c36f; border-radius: 7px; background: white; padding: .45rem .55rem; color: var(--ink); font: inherit; font-size: .78rem; font-weight: 700; text-align: left; cursor: pointer; }
.calendar-alternative:hover { border-color: var(--brand); background: var(--accent); }
.calendar-time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.employee-calendar-main { min-width: 0; overflow-x: auto; }
.employee-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.employee-calendar-toolbar h3 { margin: 0; text-align: center; }
.admin-calendar-month-picker { display: flex; align-items: center; gap: .55rem; }
.admin-calendar-month-picker label { margin: 0; white-space: nowrap; }
.admin-calendar-month-picker select { min-width: 180px; }
.admin-calendar-week-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.25rem; }
.admin-calendar-week { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.admin-calendar-week > header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: var(--accent); padding: .85rem 1rem; }
.admin-calendar-week > header h3 { margin: .12rem 0 0; }
.admin-week-totals { display: flex; gap: .7rem; color: var(--muted); font-size: .78rem; }
.admin-week-totals span { display: grid; text-align: right; }
.admin-week-totals strong { color: var(--ink); font-size: 1.05rem; }
.admin-calendar-week-days { display: grid; }
.admin-calendar-week-day { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .35rem .65rem; min-height: 58px; border-top: 1px solid var(--line); padding: .55rem .7rem; }
.admin-calendar-week-day.is-today { background: #edf4fb; box-shadow: inset 4px 0 0 var(--brand); }
.admin-calendar-week-day > div:first-child { display: grid; align-content: start; }
.admin-calendar-week-day > div:first-child span, .admin-calendar-week-day small { color: var(--muted); font-size: .7rem; }
.admin-calendar-week-day .admin-calendar-day-content { display: grid; gap: .2rem; min-width: 0; }
.admin-calendar-week-day .admin-calendar-day-content > div:last-child { display: grid; gap: .2rem; }
.admin-calendar-week-day a, .admin-calendar-week-day .admin-calendar-day-content > div:last-child > span { color: var(--ink); font-size: .76rem; text-decoration: none; }
.admin-calendar-week-day a:hover { color: var(--brand); text-decoration: underline; }
.employee-month-calendar { min-width: 720px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.employee-calendar-weekdays, .employee-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.employee-calendar-weekdays { background: var(--accent); }
.employee-calendar-weekdays span { padding: .55rem .3rem; color: var(--brand-dark); font-size: .76rem; font-weight: 800; text-align: center; }
.employee-calendar-day { min-height: 118px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: .38rem; cursor: cell; }
.employee-calendar-day:last-child { border-right: 0; }
.employee-calendar-date { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: var(--muted); font-size: .78rem; font-weight: 750; }
.employee-calendar-day > .calendar-school-holidays { margin-top: .15rem; }
.employee-calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.employee-calendar-day.is-today .employee-calendar-date { color: white; background: var(--brand); }
.employee-calendar-events { display: grid; gap: .28rem; margin-top: .25rem; }
.calendar-month-event-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: .28rem; padding: .27rem .34rem; }
.calendar-month-event-summary > strong { color: var(--brand-dark); font-size: .65rem; }
.calendar-month-event-summary > span { color: var(--ink); font-size: .66rem; font-weight: 750; text-overflow: ellipsis; }
.calendar-drag-hint { margin: .45rem 0 .1rem; color: var(--muted); font-size: .7rem; }
.employee-calendar-event.is-draggable { cursor: grab; }
.employee-calendar-event.is-draggable:active { cursor: grabbing; }
.employee-calendar-event.is-dragging { opacity: .42; transform: scale(.98); }
.employee-calendar-day.is-drop-target { outline: 3px dashed var(--brand); outline-offset: -4px; background: #edf6ff; }
.calendar-move-dialog { width: min(520px, calc(100vw - 2rem)); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 24px 70px rgba(12, 35, 27, .28); }
.calendar-move-dialog::backdrop { background: rgba(11, 30, 24, .48); backdrop-filter: blur(2px); }
.calendar-move-dialog form { display: grid; gap: .9rem; margin: 0; padding: 1.2rem; }
.calendar-move-dialog h3 { margin: .1rem 0 .35rem; }
.calendar-move-dialog p { margin: 0; }
.calendar-move-dialog small { color: var(--muted); }
.appointment-navigation-destinations { display: grid; gap: .65rem; }
.appointment-navigation-destination { display: grid; justify-items: start; gap: .15rem; text-align: left; }
.appointment-navigation-destination small { font-weight: 600; }
.calendar-move-scope { display: grid; gap: .5rem; }
.calendar-move-error { border-radius: 9px; background: #fde8e8; padding: .65rem; color: var(--red); font-size: .76rem; font-weight: 750; }
.employee-mobile-calendar-list, .agenda-mobile-event-list { display: none; }
.employee-mobile-calendar-list { gap: .65rem; }
.employee-mobile-calendar-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; }
.employee-mobile-calendar-heading h3 { margin: 0; }
.employee-mobile-calendar-heading span { color: var(--muted); font-size: .76rem; }
.employee-mobile-calendar-day { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.employee-mobile-calendar-day > header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: var(--accent); padding: .65rem .75rem; }
.employee-mobile-calendar-day > header div { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.employee-mobile-calendar-day > header span { color: var(--muted); font-size: .72rem; }
.employee-mobile-calendar-day > header small { color: var(--brand-dark); font-size: .68rem; font-weight: 800; }
.employee-mobile-calendar-events { display: grid; }
.employee-mobile-calendar-event { display: grid; gap: .16rem; border-top: 1px solid var(--line); border-left: 4px solid #d79a12; padding: .65rem .75rem; color: var(--ink); text-decoration: none; }
.employee-mobile-calendar-event:first-child { border-top: 0; }
.employee-mobile-calendar-event strong { font-size: .84rem; }
.employee-mobile-calendar-event span { color: var(--muted); font-size: .7rem; line-height: 1.35; }
.calendar-actual-time { display: block; color: #146c4a !important; font-size: .66rem !important; font-weight: 800; line-height: 1.35; white-space: normal !important; }
.employee-mobile-calendar-event.status-completed { border-left-color: #1c9b62; background: #f4fbf7; }
.employee-mobile-calendar-event.status-cancelled { border-left-color: #c84545; background: #fff7f7; text-decoration: line-through; }
.employee-mobile-calendar-empty { border: 1px dashed var(--line); border-radius: 12px; padding: .9rem; color: var(--muted); text-align: center; }
.agenda-mobile-event-list { gap: .5rem; padding: .8rem; }
.agenda-mobile-event-list .employee-mobile-calendar-event { border: 1px solid var(--line); border-left-width: 4px; border-radius: 9px; background: white; }
.calendar-more-events { display: flex; align-items: center; justify-content: center; gap: .35rem; width: 100%; min-height: 55px; margin-top: .2rem; border: 1px solid #b7cde3; border-radius: 8px; background: var(--accent); color: var(--brand-dark); font: inherit; cursor: pointer; }
.calendar-more-events:hover { border-color: var(--brand); background: #d8e8f8; }
.calendar-more-events strong { font-size: 1.2rem; }
.calendar-more-events span { font-size: .72rem; font-weight: 800; }
.calendar-team-comparison { margin-top: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfb; padding: 1rem; }
.calendar-comparison-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.calendar-comparison-heading h3 { margin: .12rem 0 .2rem; }
.calendar-comparison-legend span { display: inline-flex; border: 1px solid #d89c2f; border-radius: 999px; background: #fff4d7; padding: .24rem .5rem; color: #76510b; font-size: .66rem; font-weight: 800; }
.calendar-comparison-scroll { overflow-x: auto; }
.calendar-comparison-grid { display: grid; min-width: calc(105px + var(--calendar-people-count) * 220px); grid-template-columns: 105px repeat(var(--calendar-people-count), minmax(210px, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.calendar-comparison-grid > * { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-comparison-corner, .calendar-comparison-person { background: var(--accent); padding: .65rem .7rem; }
.calendar-comparison-corner { color: var(--muted); font-size: .7rem; font-weight: 800; }
.calendar-comparison-person { display: grid; gap: .08rem; }
.calendar-comparison-person.is-self { background: #e4f0fb; }
.calendar-comparison-person small { color: var(--muted); font-size: .62rem; }
.calendar-comparison-date { display: grid; align-content: start; gap: .08rem; padding: .65rem .7rem; background: #f8fafc; }
.calendar-comparison-date span { color: var(--muted); font-size: .68rem; }
.calendar-comparison-date.is-today { box-shadow: inset 4px 0 0 var(--brand); background: #edf4fb; }
.calendar-comparison-cell { display: grid; align-content: start; gap: .35rem; padding: .48rem; }
.calendar-comparison-cell.is-self { background: #fbfdff; }
.calendar-comparison-event { display: grid; gap: .1rem; border-left: 3px solid #d79a12; border-radius: 7px; background: #fff3d2; padding: .4rem .48rem; }
.calendar-comparison-event strong { font-size: .7rem; line-height: 1.3; }
.calendar-comparison-event span, .calendar-comparison-event small { color: var(--muted); font-size: .62rem; line-height: 1.3; }
.calendar-comparison-event.is-overlap { border: 1px solid #d89c2f; border-left-width: 4px; background: #fff0c5; }
.calendar-comparison-event.is-overlap small { color: #80560a; font-weight: 800; }
.calendar-comparison-event.status-completed { border-left-color: #1c9b62; background: #e9f8f0; }
.calendar-comparison-event.status-cancelled { border-left-color: #c84545; background: #fdeaea; text-decoration: line-through; }
.calendar-comparison-free { color: var(--muted); font-size: .68rem; }
.calendar-comparison-empty { grid-column: 1 / -1; padding: 1rem; color: var(--muted); text-align: center; }
.employee-calendar-event { display: grid; gap: .08rem; overflow: hidden; border-left: 3px solid #d79a12; border-radius: 6px; background: #fff0c7; padding: .34rem .4rem; color: var(--ink); font-size: .7rem; line-height: 1.25; text-decoration: none; }
.employee-calendar-event:hover { filter: brightness(.97); }
.employee-calendar-event strong { font-size: .72rem; }
.employee-calendar-event span { overflow: hidden; color: var(--muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-invitation-event { position: relative; padding-right: 1.8rem; }
.calendar-invitation-remove-form { position: absolute; top: .18rem; right: .18rem; z-index: 2; margin: 0; }
.calendar-invitation-remove-form button { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; min-height: 1.25rem; border: 1px solid #aeb9b4; border-radius: 999px; background: rgba(255, 255, 255, .9); padding: 0 .25rem; color: #52615b; font: inherit; font-size: .72rem; font-weight: 850; line-height: 1; cursor: pointer; }
.calendar-invitation-remove-form button:hover { border-color: #66766f; background: white; color: var(--ink); }
.employee-mobile-calendar-event.calendar-invitation-event { padding-right: .75rem; }
.employee-mobile-calendar-event .calendar-invitation-remove-form { position: static; margin-top: .35rem; }
.employee-mobile-calendar-event .calendar-invitation-remove-form button { min-width: 0; min-height: 0; border-radius: 8px; padding: .38rem .58rem; font-size: .68rem; line-height: 1.2; }
.calendar-focus-invitation-remove-form { margin: .18rem 0 .35rem; }
.calendar-focus-invitation-remove-form button { border: 0; background: transparent; padding: 0; color: #52615b; font: inherit; font-size: .63rem; font-weight: 800; text-decoration: underline; cursor: pointer; }
.calendar-focus-invitation-remove-form button:hover { color: var(--ink); }
.admin-calendar-event-main-link { display: grid; gap: .08rem; color: inherit; text-decoration: none; }
.admin-calendar-event-main-link span { display: block; }
.employee-calendar-event.status-completed { border-left-color: #1c9b62; background: #dcf4e8; }
.employee-calendar-event.status-cancelled { border-left-color: #c84545; background: #fde2e2; text-decoration: line-through; }
.admin-month-calendar .employee-calendar-event.invited-employee-event { border-left-color: #2f75b5; background: #e6f1fb; }
.teams-join-link { display: inline-flex; width: max-content; margin-top: .2rem; border-radius: 999px; background: #5146a8; padding: .18rem .45rem; color: #fff !important; font-size: .68rem !important; font-weight: 700; text-decoration: none; }
.teams-join-link:hover { background: #3f368a; }
.calendar-online-field[hidden] { display: none !important; }
.calendar-day-dialog { width: min(860px, 92vw); max-height: 90vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 24px 70px rgba(12, 35, 27, .28); }
.calendar-day-dialog::backdrop { background: rgba(11, 30, 24, .48); backdrop-filter: blur(2px); }
.calendar-day-dialog-heading { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); background: white; padding: 1rem 1.2rem; }
.calendar-day-dialog-heading h3 { margin: .1rem 0 0; }
.calendar-day-timeline { display: grid; grid-template-columns: 68px minmax(0, 1fr); height: 960px; margin: 1rem; }
.calendar-time-labels, .calendar-timeline-events { position: relative; height: 960px; }
.calendar-time-labels span { position: absolute; top: var(--slot-top); right: .65rem; transform: translateY(-.45em); color: var(--muted); font-size: .66rem; }
.calendar-time-labels span.is-full-hour { color: var(--ink); font-size: .72rem; font-weight: 800; }
.calendar-timeline-events { border: 1px solid var(--line); background: repeating-linear-gradient(to bottom, #fff 0, #fff 29px, #e7ece9 29px, #e7ece9 30px); }
.calendar-timeline-event { position: absolute; top: var(--event-top); left: var(--event-left); width: calc(var(--event-width) - 6px); height: var(--event-height); min-height: 30px; overflow: hidden; border: 1px solid #dfb84e; border-left: 4px solid #d79a12; border-radius: 7px; background: #fff0c7; padding: .38rem .45rem; color: var(--ink); font-size: .72rem; line-height: 1.25; text-decoration: none; }
.calendar-timeline-event strong, .calendar-timeline-event span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-timeline-event span { color: var(--muted); font-size: .65rem; }
.calendar-timeline-event.status-completed { border-color: #66b991; background: #dcf4e8; }
.calendar-timeline-event.status-cancelled { border-color: #db8585; background: #fde2e2; text-decoration: line-through; }
.employee-agenda-card { overflow: hidden; }
.employee-agenda-heading { align-items: flex-start; }
.employee-week-fls-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.employee-week-fls-overview > div, .employee-week-fls-overview > a { display: grid; gap: .12rem; border: 1px solid var(--line); border-top: 4px solid #94a3b8; border-radius: 11px; background: #fbfdfb; padding: .7rem .8rem; color: var(--ink); text-decoration: none; }
.employee-week-fls-overview > .traffic-green { border-top-color: #1c9b62; }
.employee-week-fls-overview > .traffic-red { border-top-color: #c84545; }
.employee-week-fls-overview span, .employee-week-fls-overview small { color: var(--muted); font-size: .7rem; line-height: 1.3; }
.employee-week-fls-overview strong { font-size: 1.3rem; }
.employee-agenda-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); align-items: start; gap: 1.2rem; }
.employee-day-agenda { min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfb; }
.agenda-day-timeline { min-width: 520px; margin: .8rem; }
.agenda-absence-banner { margin: .8rem .8rem 0; border-left: 5px solid #c84545; border-radius: 8px; background: #fdeaea; padding: .72rem .85rem; color: #8f2929; }
.agenda-school-holiday-hint { display: flex; align-items: center; gap: .45rem; margin: .7rem .8rem 0; color: var(--muted); font-size: .7rem; }
.agenda-school-holiday-hint > span { font-weight: 750; }
.agenda-empty-day { position: absolute; top: 32px; right: 24px; left: 24px; display: grid; gap: .2rem; border: 1px dashed var(--line); border-radius: 10px; background: rgba(248, 251, 249, .92); padding: .85rem; color: var(--muted); }
.agenda-empty-day strong { color: var(--ink); }
.employee-week-agenda { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.employee-week-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; background: var(--accent); padding: .85rem 1rem; }
.employee-week-heading p { margin: 0; }
.employee-week-day { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: .65rem; border-top: 1px solid var(--line); padding: .7rem .8rem; }
.employee-week-day.is-today { border-left: 5px solid var(--brand); background: #f1f6fc; box-shadow: none; }
.employee-week-date { display: grid; align-content: start; gap: .12rem; }
.employee-week-date span { color: var(--muted); font-size: .74rem; }
.employee-week-events { display: grid; gap: .3rem; }
.week-event, .week-absence { display: block; overflow: hidden; border-left: 3px solid #d79a12; border-radius: 6px; background: #fff0c7; padding: .35rem .45rem; color: var(--ink); font-size: .73rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.week-event small { display: block; overflow: hidden; margin-top: .12rem; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; }
.week-event.status-completed { border-color: #1c9b62; background: #dcf4e8; }
.week-event.status-cancelled { border-color: #c84545; background: #fde2e2; text-decoration: line-through; }
.week-absence.kind-sick { border-color: #c84545; background: #fdeaea; color: #8f2929; }
.week-absence.kind-vacation { border-color: var(--brand); background: var(--accent); color: var(--brand-dark); }
.week-empty { color: var(--muted); font-size: .76rem; }
.agenda-new-appointment-link { display: flex; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.agenda-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.agenda-notes-field { grid-column: 1 / -1; }
.agenda-invitees-field { grid-column: span 2; }
.internal-fls-credit-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 1rem 0; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 12px; background: #fbfdfb; padding: 1rem; }
.internal-fls-credit-summary h3 { margin: 0; }
.internal-credit-list { display: grid; min-width: 280px; gap: .35rem; }
.internal-credit-list span { display: grid; border-radius: 8px; background: white; padding: .5rem .65rem; }
.review-employee-groups { display: grid; gap: 1rem; }
.review-employee-group { padding: 0; }
.review-employee-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; padding: 1.15rem 1.25rem; }
.review-employee-group > summary::-webkit-details-marker { display: none; }
.review-employee-group > summary > span:first-child { display: grid; gap: .18rem; }
.review-overall-totals { margin-bottom: 1rem; }
.review-employee-heading-totals { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.review-employee-heading-totals > span:not(.status-badge) { display: grid; min-width: 105px; gap: .08rem; text-align: right; }
.review-employee-heading-totals small { color: var(--muted); font-size: .7rem; font-weight: 650; }
.review-employee-heading-totals strong { white-space: nowrap; }
.review-employee-content { border-top: 1px solid var(--line); padding: 1.15rem 1.25rem; }
.admin-week-absence-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: .5rem; overflow-x: auto; }
.admin-employee-fls-summary-table { min-width: 780px; font-size: .84rem; }
.admin-employee-fls-summary-table td:first-child { min-width: 190px; }
.admin-employee-fls-summary-table td:first-child small { display: block; margin-top: .18rem; color: var(--muted); font-size: .66rem; }
.admin-employee-fls-summary-table .traffic-cell-green, .admin-employee-fls-summary-table .traffic-cell-red, .admin-employee-fls-summary-table .traffic-cell-neutral { border-left-width: 5px; border-left-style: solid; }
.security-note { margin-top: 1rem; color: var(--muted); font-size: .82rem; }
.remember-login-option { display: flex; align-items: flex-start; gap: .6rem; margin: .45rem 0 0; line-height: 1.45; cursor: pointer; }
.remember-login-option input[type="checkbox"] { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; padding: 0; accent-color: var(--brand); }
.login-legal-links { display: flex; align-items: center; justify-content: center; gap: .45rem 1rem; flex-wrap: wrap; margin-top: 1.15rem; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .82rem; }
.login-legal-links a { font-weight: 700; }
.legal-footer { display: flex; align-items: center; justify-content: center; gap: .55rem 1.15rem; flex-wrap: wrap; width: min(1180px, 92vw); margin: 0 auto 1.5rem; border-top: 1px solid var(--line); padding: 1.1rem 0 0; color: var(--muted); font-size: .78rem; }
.legal-footer a { color: var(--muted); font-weight: 700; }
.legal-page { max-width: 1040px; margin-inline: auto; }
.legal-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.legal-card, .legal-summary, .legal-toc { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 34px rgba(25, 50, 39, .05); }
.legal-card { margin-bottom: 1rem; padding: 1.4rem 1.55rem; scroll-margin-top: 1rem; }
.legal-card h2 { margin-bottom: .75rem; color: var(--brand-dark); font-size: 1.35rem; }
.legal-card h3 { margin: 1.25rem 0 .5rem; font-size: 1.05rem; }
.legal-card p, .legal-card li, .legal-summary p { line-height: 1.65; }
.legal-card p:last-child, .legal-summary p:last-child { margin-bottom: 0; }
.legal-card address { font-style: normal; line-height: 1.7; }
.legal-card ul, .legal-card ol { padding-left: 1.35rem; }
.legal-card li + li { margin-top: .35rem; }
.legal-summary { margin-bottom: 1rem; border-left: 6px solid var(--brand); background: linear-gradient(135deg, #fff, var(--accent)); padding: 1.45rem 1.55rem; }
.legal-summary h2 { margin: .25rem 0 .65rem; color: var(--brand-dark); }
.legal-toc { display: flex; align-items: center; gap: .45rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding: 1rem 1.25rem; }
.legal-toc a { font-weight: 700; }
.legal-table-wrap { overflow-x: auto; margin: .75rem 0 1.1rem; border: 1px solid var(--line); border-radius: 12px; }
.legal-table { min-width: 860px; background: white; }
.legal-table th { background: var(--soft); color: var(--brand-dark); }
.legal-table td { font-size: .9rem; line-height: 1.5; }
.legal-table td:first-child { width: 20%; }
.legal-table td:nth-child(2) { width: 50%; }
.legal-steps { display: grid; gap: .45rem; counter-reset: legal-step; list-style: none; padding-left: 0 !important; }
.legal-steps li { position: relative; min-height: 2.4rem; padding: .55rem .65rem .55rem 3.15rem; border-radius: 10px; background: var(--soft); counter-increment: legal-step; }
.legal-steps li::before { position: absolute; top: .52rem; left: .65rem; display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; background: var(--brand); color: white; content: counter(legal-step); font-weight: 850; }
.client-signature-explainer { border-color: #a9c4e0; }
.server-location-badge { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .55rem; border-radius: 999px; background: #eaf5ef; padding: .5rem .85rem; color: #155e42; }
.server-location-badge span { color: #19a56a; }
.legal-updated { margin: 1.25rem 0 0; color: var(--muted); text-align: right; font-size: .8rem; }
.two-factor-card, .password-change-card { max-width: 860px; margin-inline: auto; }
.two-factor-setup-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(280px, 1.2fr); gap: 1.5rem; align-items: center; margin-top: 1.2rem; }
.qr-panel { display: grid; justify-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 1rem; }
.qr-panel img { width: min(240px, 100%); height: auto; image-rendering: pixelated; }
.qr-panel span, .setup-steps { color: var(--muted); }
.setup-secret { display: block; overflow-wrap: anywhere; margin: .45rem 0 1rem; border-radius: 8px; background: var(--accent); padding: .8rem; color: var(--brand-dark); font-size: 1rem; font-weight: 800; letter-spacing: .08em; }
.two-factor-code-form { margin-top: 1rem; }
.backup-code-grid { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: .65rem; margin: 1rem 0 1.25rem; }
.backup-code-grid code { border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: .7rem; text-align: center; font-size: 1rem; font-weight: 800; letter-spacing: .08em; }
.account-table { min-width: 1050px; }
.account-table td:first-child small { display: block; margin-top: .2rem; color: #9c2d2d; font-size: .7rem; }
.account-form { max-width: 900px; margin-inline: auto; }
.account-link { color: #e1effc; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.admin-week-absence-day { min-width: 120px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb; padding: .65rem; }
.admin-week-absence-day.is-today { border-color: var(--brand); box-shadow: inset 0 0 0 2px rgba(45, 110, 172, .16); }
.admin-week-absence-day > div { display: flex; justify-content: space-between; gap: .35rem; margin-bottom: .5rem; }
.admin-week-absence-day > div span { color: var(--muted); font-size: .72rem; }
.absence-review-count { border-left: 4px solid var(--brand); border-radius: 8px; background: var(--accent); padding: .7rem .85rem; }
.admin-absence-person { display: grid; gap: .08rem; margin-top: .3rem; border-left: 3px solid #94a3b8; border-radius: 6px; background: #f2f5f3; padding: .35rem; font-size: .68rem; }
.admin-absence-person small { font-size: .61rem; }
.admin-absence-person.kind-sick { border-color: #c84545; background: #fdeaea; color: #8f2929; }
.admin-absence-person.kind-vacation { border-color: var(--brand); background: var(--accent); color: var(--brand-dark); }
.admin-weekly-fls-table { min-width: 1080px; font-size: .82rem; }
.admin-weekly-fls-table th, .admin-weekly-fls-table td { padding: .68rem .72rem; vertical-align: middle; }
.admin-weekly-fls-table thead tr:first-child th:not(:first-child) { border-left: 2px solid #b9cec4; text-align: center; }
.admin-weekly-fls-table thead tr:nth-child(2) th:nth-child(4),
.admin-weekly-fls-table thead tr:nth-child(2) th:nth-child(7) { border-left: 2px solid #b9cec4; }
.admin-weekly-fls-table tbody td:nth-child(5),
.admin-weekly-fls-table tbody td:nth-child(8),
.admin-weekly-fls-table tfoot td:nth-child(5),
.admin-weekly-fls-table tfoot td:nth-child(8) { border-left: 2px solid #d7e2dc; }
.admin-weekly-fls-table th small, .admin-weekly-fls-table td small { display: block; margin-top: .15rem; color: var(--muted); font-size: .68rem; font-weight: 600; }
.admin-weekly-fls-table tfoot th, .admin-weekly-fls-table tfoot td { border-top: 2px solid var(--brand); background: var(--accent); }
.admin-employee-quick-list { display: grid; gap: .7rem; }
.admin-employee-quick-row { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(220px, 1fr) minmax(0, 1.45fr); align-items: stretch; gap: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; padding: .8rem; }
.admin-employee-quick-person { display: grid; align-content: center; gap: .16rem; }
.admin-employee-quick-person > a { color: var(--brand-dark); font-size: .96rem; text-decoration: none; }
.admin-employee-quick-person > a:hover { text-decoration: underline; }
.admin-employee-quick-person > span { color: var(--ink); font-size: .8rem; }
.admin-employee-quick-person > span b { font-size: 1.22rem; }
.admin-employee-quick-person > small, .admin-employee-quick-label { color: var(--muted); font-size: .68rem; font-weight: 700; }
.admin-employee-quick-clients { display: grid; align-content: center; gap: .32rem; min-width: 0; }
.admin-employee-quick-clients > div { display: flex; flex-wrap: wrap; gap: .3rem; }
.admin-employee-client-chip-wrap { display: grid; align-content: start; overflow: hidden; border: 1px solid #c7d8e9; border-radius: 8px; background: white; }
.admin-employee-client-chip-wrap.is-paused { border-style: dashed; background: #f1f4f7; }
.admin-employee-client-chip { display: grid; gap: .04rem; border: 1px solid #c7d8e9; border-radius: 8px; background: white; padding: .28rem .42rem; color: var(--ink); font-size: .7rem; line-height: 1.2; text-decoration: none; }
.admin-employee-client-chip-wrap .admin-employee-client-chip { border: 0; border-radius: 0; background: transparent; }
.admin-employee-client-chip:hover { border-color: var(--brand); background: var(--accent); }
.admin-employee-client-chip small { color: var(--muted); font-size: .6rem; }
.representation-load-form { border-top: 1px solid var(--line); padding: .22rem .42rem; }
.representation-load-form .link-button { color: var(--brand-dark); font-size: .6rem; font-weight: 800; }
.admin-employee-quick-empty { color: var(--muted); font-size: .72rem; }
.admin-employee-quick-weeks { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.admin-employee-quick-week { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.admin-employee-quick-week.is-current { border-color: #8eb3d7; box-shadow: inset 0 3px 0 var(--brand); }
.admin-employee-quick-week header { display: grid; gap: .05rem; border-bottom: 1px solid var(--line); background: var(--soft); padding: .42rem .5rem; }
.admin-employee-quick-week.is-current header { background: var(--accent); }
.admin-employee-quick-week header strong { font-size: .7rem; }
.admin-employee-quick-week header small { color: var(--muted); font-size: .58rem; }
.admin-employee-quick-week > div { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; padding: .45rem .5rem; }
.admin-employee-quick-week > div span { display: grid; gap: .04rem; color: var(--muted); font-size: .62rem; }
.admin-employee-quick-week > div b { color: var(--ink); font-size: .92rem; }
.attention-button { border-color: #c84545; color: #9f2f2f; }
.assignment-queue-summary { margin-bottom: 1rem; }
.assignment-queue-group { margin-top: 1rem; }
.assignment-queue-group.is-selected { border: 2px solid #d99d13; box-shadow: 0 14px 34px rgba(217, 157, 19, .12); }
.assignment-bulk-form { display: grid; min-width: min(100%, 420px); gap: .45rem; }
.assignment-bulk-form label { color: var(--muted); font-size: .78rem; font-weight: 800; }
.assignment-inline-form { display: flex; align-items: center; gap: .5rem; }
.assignment-inline-form select { min-width: 210px; }
.assignment-close-form { white-space: nowrap; }
.assignment-queue-table td small { display: block; margin-top: .15rem; color: var(--muted); }
.handover-map-card { margin-top: 1.4rem; }
.handover-case-symbol { display: inline-block; width: 15px; height: 15px; border: 3px solid white; border-radius: 50%; background: #c84545; box-shadow: 0 0 0 1px #8e2f2f; }
#handover-map { width: 100%; height: min(58vh, 610px); min-height: 430px; border-block: 1px solid var(--line); background: #e6eee9; }
.handover-workload-section, .handover-decision-section { margin-top: 1.4rem; }
.handover-workload-table { min-width: 900px; }
.handover-capacity-bar { width: 150px; height: 8px; margin-top: .32rem; overflow: hidden; border-radius: 999px; background: #e6ece8; }
.handover-capacity-bar span { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: #94a3b8; }
.handover-capacity-bar span.traffic-green { background: #1c9b62; }
.handover-capacity-bar span.traffic-yellow { background: #e6a817; }
.handover-capacity-bar span.traffic-red { background: #c84545; }
.handover-evaluation-list { display: grid; gap: .8rem; }
.handover-evaluation { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.handover-evaluation[open] { border-color: #9fbeda; box-shadow: 0 6px 18px rgba(45, 110, 172, .1); }
.handover-evaluation > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: #fbfdfb; cursor: pointer; }
.handover-evaluation > summary > span:first-child { display: grid; gap: .2rem; }
.handover-evaluation > summary small, .handover-evaluation table small { display: block; margin-top: .18rem; color: var(--muted); }
.handover-evaluation table { min-width: 1180px; }
.handover-evaluation td { vertical-align: middle; }
.test-client-row { background: #fffaf0; }
.test-data-badge { display: inline-block; margin-left: .3rem; border-radius: 999px; background: #6846b7; padding: .18rem .42rem; color: white; font-size: .65rem; font-weight: 850; letter-spacing: .04em; }
.test-client-notice { border-left: 5px solid #6846b7; background: #f2edff; }
.hours-entry-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem; }
.hours-entry-panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfb; padding: 1rem; }
.hours-entry-panel h3 { margin: .15rem 0 .8rem; }
.hours-manual-form { display: grid; gap: .9rem; }
.hours-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.hours-form-grid > div:first-child, .hours-form-grid > div:nth-child(2), .hours-notes-field { grid-column: 1 / -1; }
.hours-activities-field, .confirmation-activities, .confirmation-documentation { grid-column: 1 / -1; }
.form-help { display: block; margin-top: .3rem; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.activity-autocomplete-wrap { position: relative; }
.activity-terms-editor { display: grid; gap: .65rem; min-width: 0; }
.activity-terms-help, .activity-terms-limit { display: block; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.activity-term-slot { display: grid; gap: .25rem; min-width: 0; }
.activity-term-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.activity-term-heading label { margin: 0; font-size: .8rem; }
.activity-terms-editor .activity-add { width: 100%; padding: .55rem .65rem; text-align: left; white-space: normal; font-size: .8rem; }
.activity-terms-editor .activity-remove { width: auto; border: 0; background: transparent; padding: .25rem; color: var(--muted); font-size: .73rem; }
.activity-terms-summary { display: block; padding: .55rem .65rem; border-radius: 8px; background: var(--accent); font-size: .8rem; overflow-wrap: anywhere; }
.activity-legacy-note { display: block; color: #794c00; background: #fff6df; padding: .5rem; border-radius: 8px; font-size: .78rem; }
.activity-terms-editor [hidden] { display: none !important; }
.service-sheet-activity-cell .activity-terms-editor { gap: .4rem; }
.service-sheet-activity-cell .activity-terms-help, .service-sheet-activity-cell .activity-terms-limit { font-size: 10px; }
.service-sheet-activity-cell .activity-term-heading label, .service-sheet-activity-cell .activity-terms-summary { font-size: 11px; }
.service-sheet-activity-cell .activity-terms-editor .activity-add { font-size: 11px; }
.activity-suggestion-menu { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; left: 0; overflow: hidden; border: 1px solid #acc7e1; border-radius: 9px; background: white; box-shadow: 0 12px 26px rgba(23, 40, 61, .16); }
.activity-suggestion-menu[hidden] { display: none; }
.activity-suggestion-menu button { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: white; padding: .6rem .7rem; color: var(--ink); font-weight: 650; text-align: left; }
.activity-suggestion-menu button:last-child { border-bottom: 0; }
.activity-suggestion-menu button:hover, .activity-suggestion-menu button:focus { background: var(--accent); }
.duration-preview { display: flex; flex-direction: column; justify-content: center; gap: .2rem; border: 1px solid #c5d8eb; border-radius: 9px; background: var(--accent); padding: .55rem .7rem; }
.duration-preview span { color: var(--muted); font-size: .73rem; font-weight: 650; }
.duration-preview output { color: var(--brand-dark); font-size: 1.05rem; font-weight: 800; }
.planned-confirmation-list { display: grid; gap: .75rem; margin-top: .8rem; }
.planned-confirmation-card { border: 1px solid var(--line); border-radius: 11px; background: white; padding: .85rem; }
.planned-confirmation-card.is-upcoming { background: #f6f8f7; }
.planned-confirmation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.planned-confirmation-heading > div { display: grid; gap: .15rem; }
.planned-confirmation-heading > div span, .upcoming-note { color: var(--muted); font-size: .82rem; }
.planned-confirmation-form { display: grid; gap: .75rem; margin-top: .75rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.calendar-carryover-field, .manage-calendar-carryover-field, .confirmation-carryover { border: 1px solid #b8d3ed; border-radius: 9px; background: #f1f7fd; padding: .65rem .75rem; }
.calendar-carryover-field[hidden] { display: none; }
.choice-row { display: flex; align-items: center; gap: .55rem; margin: 0; font-weight: 750; }
.choice-row input { width: auto; margin: 0; }
.calendar-carryover-balance { display: block; margin-top: .35rem; color: var(--brand); font-weight: 800; }
.calendar-billing-rule,
.confirmation-policy,
.confirmation-billing-decision {
  display: grid;
  gap: .3rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--accent);
}
.calendar-billing-rule[hidden] { display: none; }
.calendar-billing-rule span,
.confirmation-policy span { color: var(--muted); }
.carryover-total { display: grid; min-width: 12rem; gap: .15rem; border: 1px solid #b8d3ed; border-radius: 10px; background: #f1f7fd; padding: .65rem .8rem; }
.carryover-total span, .carryover-total small, .fls-carryover-card td small { display: block; color: var(--muted); }
.carryover-total strong { color: var(--brand-dark); font-size: 1.25rem; }
.confirmation-question { margin: 0; font-weight: 800; }
.confirmation-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.confirmation-notes, .confirmation-cancel, .confirmation-quota,
.confirmation-policy, .confirmation-billing-decision { grid-column: 1 / -1; }
.confirmation-documentation { border: 1px solid #b8d3ed; border-radius: 10px; background: #f5f9fd; }
.confirmation-documentation summary { padding: .7rem .8rem; color: var(--brand-dark); font-weight: 800; cursor: pointer; }
.confirmation-documentation-fields { display: grid; gap: .4rem; padding: 0 .8rem .8rem; }
.confirmation-documentation-fields label span,
.confirmation-documentation-fields small { color: var(--muted); font-weight: 500; }
.confirmation-documentation-fields textarea { min-height: 7rem; resize: vertical; }
.confirmation-cancel { display: grid; gap: .45rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.confirmation-cancel small { color: var(--muted); }
.confirmation-fields label { font-size: .78rem; }
.confirmation-fields input, .confirmation-fields textarea { padding: .55rem .6rem; }
.upcoming-note { margin: .65rem 0 0; }
.hours-entry-table { min-width: 1060px; font-size: .86rem; }
.hours-entry-table th, .hours-entry-table td { padding: .7rem .75rem; vertical-align: middle; }
.hours-keywords { min-width: 260px; white-space: normal; }
.hours-month-toolbar > div { text-align: center; }
.hours-month-toolbar h2 { margin: .15rem 0 0; }
.fls-performance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 1.2rem; }
.fls-performance-grid > div { display: grid; gap: .18rem; border: 1px solid var(--line); border-top: 4px solid #94a3b8; border-radius: 12px; background: #fbfdfb; padding: .8rem .9rem; }
.fls-performance-grid > div.traffic-green { border-top-color: #1c9b62; }
.fls-performance-grid > div.traffic-red { border-top-color: #c84545; }
.fls-performance-grid span, .fls-performance-grid small { color: var(--muted); font-size: .75rem; }
.fls-performance-grid strong { font-size: 1.25rem; }
.hours-client-list { display: grid; gap: .65rem; }
.hours-client-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.hours-client-accordion[open] { border-color: #acc7e1; box-shadow: 0 6px 18px rgba(45, 110, 172, .1); }
.hours-client-accordion summary { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(110px, .75fr)); align-items: center; gap: .8rem; padding: .85rem 1rem; cursor: pointer; list-style-position: inside; }
.hours-client-accordion summary:hover { background: var(--accent); }
.hours-client-accordion summary > span { display: grid; gap: .12rem; }
.hours-client-accordion summary small { color: var(--muted); font-size: .72rem; }
.hours-client-name { margin-right: auto; }
.hours-client-details { border-top: 1px solid var(--line); background: #fbfdfb; padding: 1rem; }
.hours-client-details h3 { margin: 1.2rem 0 .65rem; font-size: 1rem; }
.hours-client-details h3:first-child { margin-top: 0; }
.hours-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hours-detail-heading h3 { margin: 0; }
.planning-revenue { display: block; margin-top: .35rem; color: var(--muted); font-size: .7rem; white-space: normal; }
.planning-revenue.status-missing, .planning-revenue.status-ambiguous { color: #9c2d2d; }
.planning-forecast-total th, .planning-forecast-total td { border-top: 2px solid var(--brand); background: var(--accent); }
.planning-forecast-total td { text-align: right; }
.planning-forecast-total small, .admin-performance-table small, .admin-forecast-table small { display: block; margin-top: .18rem; color: var(--muted); font-size: .7rem; }
.admin-performance-table { min-width: 1450px; font-size: .82rem; }
.admin-performance-table th, .admin-performance-table td { padding: .68rem .72rem; vertical-align: middle; }
.admin-forecast-table { min-width: 820px; }
.admin-forecast-table td:not(:first-child), .admin-forecast-table th:not(:first-child) { text-align: right; }
.admin-forecast-table tfoot th, .admin-forecast-table tfoot td { border-top: 2px solid var(--brand); background: var(--accent); }
.traffic-text-green { color: #0f6842; }
.traffic-text-red { color: #9c2d2d; }
.traffic-card { border-top: 4px solid #94a3b8; }
.traffic-card.traffic-green { border-top-color: #1c9b62; }
.traffic-card.traffic-yellow { border-top-color: #e6a817; }
.traffic-card.traffic-red { border-top-color: #c84545; }
.section-heading-card { padding-bottom: 1rem; }
.case-month-accordion-list { display: grid; gap: .65rem; margin-top: 1rem; }
.case-month-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.case-month-accordion[open] { border-color: #acc7e1; box-shadow: 0 6px 18px rgba(45, 110, 172, .08); }
.case-month-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; cursor: pointer; color: var(--ink); }
.case-month-accordion > summary:hover { background: var(--accent); }
.case-month-accordion > summary span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.case-month-accordion > .table-wrap { margin: 0; border-top: 1px solid var(--line); border-radius: 0; }
.case-section-accordion { padding: 0; overflow: hidden; }
.case-section-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem; cursor: pointer; list-style-position: inside; }
.case-section-accordion > summary:hover { background: var(--accent); }
.case-section-accordion > summary > span:first-child { display: grid; gap: .18rem; }
.case-section-accordion > summary strong { font-size: 1.35rem; }
.case-section-accordion-hint { color: var(--brand); font-size: .78rem; font-weight: 800; }
.case-section-accordion-body { border-top: 1px solid var(--line); padding: 1.1rem 1.35rem 1.35rem; }
.case-section-accordion-body > .actions { justify-content: flex-end; margin-bottom: .8rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: .15rem 0 0; }
.authorization-block { border-top: 1px solid var(--line); padding-top: 1.15rem; margin-top: 1.15rem; }
.authorization-form { gap: 1.2rem; }
.authorization-form-section { border: 1px solid var(--line); border-radius: 13px; background: #fbfdfb; padding: 1rem; }
.authorization-form-section .section-heading { align-items: flex-start; }
.authorization-fields-grid, .authorization-weekly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.authorization-fields-grid p, .authorization-weekly-grid p { margin: 0; }
.authorization-weekly-grid p { border-left: 4px solid var(--brand); border-radius: 8px; background: white; padding: .8rem; }
.authorization-heading, .quota-title, .assignment-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.authorization-heading h3, .authorization-heading p { margin: 0; }
.authorization-heading p { color: var(--muted); margin-top: .25rem; }
.quota-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 1rem; }
.quota-card { border: 1px solid var(--line); border-left-width: 5px; border-radius: 13px; padding: 1rem; }
.traffic-border-green { border-left-color: #1c9b62; }
.traffic-border-yellow { border-left-color: #e6a817; }
.traffic-border-red { border-left-color: #c84545; }
.quota-title { justify-content: flex-start; }
.quota-title a { margin-left: auto; font-size: .86rem; }
.quota-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .9rem 0 .6rem; }
.quota-numbers span { display: grid; gap: .1rem; color: var(--muted); font-size: .8rem; }
.quota-numbers strong { color: var(--ink); font-size: 1.15rem; }
.quota-progress { height: 9px; overflow: hidden; border-radius: 99px; background: #e5ebe7; }
.quota-progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.quota-foot { margin: .5rem 0 0; color: var(--muted); font-size: .84rem; }
.case-column-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.4rem; }
.case-column-grid > .card { min-width: 0; }
.compact-table th, .compact-table td { padding: .7rem .65rem; }
.three-month-calendar { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: .8rem; overflow-x: auto; padding-bottom: .8rem; }
.calendar-month { min-width: 270px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.calendar-month h3 { margin: 0; padding: .7rem .75rem; background: var(--accent); font-size: .95rem; }
.calendar-weekdays, .calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays span { padding: .38rem .1rem; color: var(--muted); font-size: .68rem; font-weight: 750; text-align: center; }
.calendar-day { min-height: 54px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: .22rem; overflow: hidden; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-date { display: block; color: var(--muted); font-size: .68rem; }
.outside-month { opacity: .35; background: #f6f8f7; }
.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.calendar-event { display: block; margin-top: .15rem; border-radius: 4px; padding: .12rem .2rem; color: var(--ink); font-size: .62rem; line-height: 1.2; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.assignment-list { display: grid; gap: .7rem; }
.assignment-row { border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.assignment-row:last-child { border-bottom: 0; }
.assignment-row div { display: grid; gap: .2rem; }
.assignment-row span { color: var(--muted); font-size: .85rem; }
.is-muted { opacity: .6; }
.status-badge { display: inline-block; border-radius: 999px; background: #eef2f0; padding: .25rem .52rem; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.status-approved, .status-completed { color: #0f6842; background: #dcf4e8; }
.status-submitted, .status-planned { color: #7a5505; background: #fff0c7; }
.status-prepared { color: #315a7d; background: #eaf1f8; }
.status-sent { color: #0f6842; background: #dcf4e8; }
.status-failed { color: #9c2d2d; background: #fde2e2; }
.status-rejected, .status-cancelled { color: #9c2d2d; background: #fde2e2; }
.status-invoiced { color: #315a93; background: #e4edfb; }
.danger-link { color: #a92f2f; }
.documentation-list { display: grid; gap: .9rem; }
.documentation-entry { border-left: 4px solid var(--brand); border-radius: 8px; background: #f8fbf9; padding: .9rem 1rem; }
.documentation-entry p { margin: .65rem 0 0; }
.documentation-meta { display: flex; justify-content: space-between; gap: 1rem; }
.documentation-meta span, .empty-note { color: var(--muted); }
.documentation-entry-actions { margin-top: .8rem; }
.documentation-entry-actions form { margin: 0; }
.documentation-photo { display: inline-grid; gap: .35rem; margin-top: .8rem; color: var(--brand); font-weight: 750; text-decoration: none; }
.documentation-photo img { display: block; width: min(100%, 420px); max-height: 320px; object-fit: cover; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.documentation-photo:hover span { text-decoration: underline; }
.documentation-photo.is-pdf { grid-template-columns: auto minmax(0, 1fr); align-items: center; width: max-content; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: .55rem .7rem; }
.documentation-pdf-mark { display: inline-flex; align-items: center; justify-content: center; width: 2.7rem; height: 2rem; border-radius: 6px; background: #eef2f6; color: var(--brand-dark); font-size: .7rem; font-weight: 900; }
.report-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.report-source-grid > div { display: grid; gap: .2rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; padding: 1rem; }
.report-source-grid strong { color: var(--brand-dark); font-size: 1.35rem; }
.report-source-grid span { color: var(--muted); font-size: .86rem; }
.report-draft-card { margin-top: 1rem; }
.report-progress { display: flex; align-items: center; gap: 1rem; border: 1px solid #b9cee4; border-radius: 12px; background: #eef5fb; padding: 1rem; }
.report-progress p { margin: .25rem 0 0; color: var(--muted); }
.report-progress-spinner { width: 28px; height: 28px; flex: 0 0 auto; border: 3px solid #c8d9e9; border-top-color: var(--brand); border-radius: 50%; animation: report-spin .85s linear infinite; }
.report-editor-form textarea { min-height: 65vh; font-family: inherit; line-height: 1.55; resize: vertical; }
.report-layout-fields { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid #c9d7e6; border-radius: 14px; background: #f7fafd; }
.report-layout-fields legend { padding: 0 .45rem; color: #123f73; font-size: 1.08rem; font-weight: 800; }
.report-layout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.report-layout-grid label { display: grid; gap: .35rem; margin: 0; font-weight: 700; }
.report-layout-grid input { width: 100%; }
.report-layout-wide { grid-column: 1 / -1; }
.report-editor-actions { align-items: stretch; flex-wrap: wrap; }
.report-editor-actions > * { min-height: 2.75rem; }
@media (max-width: 720px) {
  .report-layout-grid { grid-template-columns: 1fr; }
  .report-layout-wide { grid-column: auto; }
  .report-editor-actions > * { width: 100%; justify-content: center; }
}
@keyframes report-spin { to { transform: rotate(360deg); } }
.upload-destination-dialog { width: min(620px, calc(100vw - 2rem)); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 24px 70px rgba(20, 41, 70, .3); }
.upload-destination-dialog::backdrop { background: rgba(15, 31, 52, .48); backdrop-filter: blur(2px); }
.upload-destination-dialog-content { position: relative; padding: 1.6rem; }
.upload-destination-dialog-content h2 { margin: .25rem 2.5rem .75rem 0; }
.upload-destination-dialog-content p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.upload-destination-dialog-content .actions { margin-top: 1.25rem; }
.upload-destination-dialog-close { position: absolute; top: .8rem; right: .8rem; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: #edf3f9; color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.upload-destination-dialog-close:hover { background: #dfeaf5; }
.case-representation-badge { display: block; width: max-content; max-width: 100%; margin-bottom: .35rem; border-radius: 999px; background: #eaf1f8; padding: .22rem .5rem; color: var(--brand-dark); font-size: .68rem; font-weight: 800; line-height: 1.3; }
.representation-load-control { display: grid; width: max-content; max-width: 100%; gap: .12rem; margin: 0 0 .45rem; border-left: 3px solid #2f9d62; border-radius: 6px; background: #edf8f2; padding: .35rem .5rem; }
.representation-load-control.is-paused { border-left-color: #8b98a7; background: #f1f4f7; }
.representation-load-control > span { color: var(--ink); font-size: .68rem; font-weight: 800; }
.representation-load-control .link-button { color: var(--brand-dark); font-size: .66rem; font-weight: 800; text-align: left; }
.map-placeholder { border-style: dashed; }
.map-card { padding: 0; overflow: hidden; }
.map-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.4rem 1rem; }
.map-heading h2 { margin: .15rem 0 0; }
.map-selection-summary { margin: .65rem 0 0; color: var(--brand-dark); font-weight: 750; }
.map-region { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.map-key { display: flex; align-items: center; gap: .55rem 1rem; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.map-toggle { display: inline-flex; align-items: center; gap: .4rem; margin: 0; cursor: pointer; }
.map-toggle input { width: auto; margin: 0; padding: 0; accent-color: var(--brand); }
.employee-symbol, .client-symbol, .inquiry-symbol { display: inline-block; border-radius: 50%; background: var(--brand); }
.employee-symbol { width: 17px; height: 17px; border: 3px solid var(--brand-dark); }
.client-symbol { width: 13px; height: 13px; border: 2px solid white; box-shadow: 0 0 0 1px var(--line); }
.inquiry-symbol { width: 15px; height: 15px; border: 3px solid #6f3d05; background: #e48a19; }
#case-map { width: 100%; height: min(62vh, 640px); min-height: 430px; border-block: 1px solid var(--line); background: #e6eee9; }
.employee-map-legend { display: flex; flex-wrap: wrap; gap: .55rem; padding: .9rem 1.4rem 0; }
.employee-map-legend-item { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .42rem .68rem; color: var(--muted); font-size: .86rem; font-weight: 650; }
.employee-map-legend-item:hover { background: var(--accent); color: var(--ink); }
.employee-map-legend-item.is-active { border-color: var(--brand); background: var(--accent); color: var(--brand-dark); box-shadow: 0 0 0 2px rgba(45, 110, 172, .12); }
.employee-map-legend-color { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(16, 47, 37, .35); flex: 0 0 auto; }
.employee-map-name-flag { position: relative; appearance: none; border: 2px solid var(--employee-map-color, var(--brand)); border-radius: 7px; background: rgba(255, 255, 255, .95); padding: .28rem .48rem; color: #142338; box-shadow: 0 3px 10px rgba(20, 35, 56, .2); font-family: inherit; font-size: .7rem; font-weight: 750; line-height: 1.15; text-align: left; cursor: pointer; }
.employee-map-name-flag > span { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-map-name-flag::before { content: ""; position: absolute; top: 50%; left: -9px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 8px solid var(--employee-map-color, var(--brand)); transform: translateY(-50%); }
.employee-map-name-flag:hover, .employee-map-name-flag.is-selected { background: #fff; box-shadow: 0 0 0 3px rgba(45, 110, 172, .16), 0 5px 14px rgba(20, 35, 56, .24); }
.client-map-name-flag { position: relative; appearance: none; border: 1px solid var(--client-map-color, var(--brand)); border-radius: 6px; background: rgba(255, 255, 255, .92); padding: .2rem .38rem; color: #24364d; box-shadow: 0 2px 8px rgba(20, 35, 56, .16); font-family: inherit; font-size: .62rem; font-weight: 700; line-height: 1.1; text-align: left; cursor: pointer; }
.client-map-name-flag > span { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-map-name-flag::before { content: ""; position: absolute; top: 50%; left: -7px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 7px solid var(--client-map-color, var(--brand)); transform: translateY(-50%); }
.client-map-name-flag:hover { z-index: 2; background: #fff; box-shadow: 0 0 0 2px rgba(45, 110, 172, .14), 0 4px 12px rgba(20, 35, 56, .2); }
.employee-map-name-flag[hidden], .client-map-name-flag[hidden] { display: none !important; }
.inquiry-distance-evaluation { display: grid; gap: .8rem; border-top: 1px solid var(--line); padding: 1.1rem 1.4rem .3rem; }
.inquiry-distance-evaluation h3 { margin: .15rem 0 0; }
.inquiry-distance-evaluation td small { display: block; margin-top: .18rem; color: var(--muted); }
.inquiry-distance-ranking { margin-top: .35rem; }
.inquiry-distance-ranking summary { color: var(--brand); font-size: .78rem; font-weight: 750; cursor: pointer; }
.inquiry-distance-ranking ol { display: grid; gap: .25rem; margin: .45rem 0 0; padding-left: 1.2rem; }
.inquiry-distance-ranking li { padding-left: .15rem; font-size: .78rem; }
.inquiry-distance-ranking li span, .inquiry-distance-ranking li strong { display: inline; }
.inquiry-distance-ranking li strong { margin-left: .3rem; white-space: nowrap; }
.map-status { padding: .8rem 1.4rem 1rem; color: var(--muted); font-size: .92rem; }
.maplibregl-popup-content strong { display: block; margin-bottom: .3rem; font-size: 1rem; }
.maplibregl-popup-content { border-radius: 10px; padding: .85rem 1rem; box-shadow: 0 8px 26px rgba(25, 50, 39, .16); }
.maplibregl-ctrl-group { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 22px rgba(25, 50, 39, .12); overflow: hidden; }
.controlling-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: .9rem; align-items: end; }
.controlling-filter-action { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.controlling-stats .stat-card { min-height: 115px; }
.controlling-month-table small { display: block; color: var(--muted); margin-top: .2rem; }
.controlling-employee-table { min-width: 1050px; border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.controlling-employee-table th, .controlling-employee-table td { padding: .58rem .62rem; vertical-align: middle; white-space: nowrap; }
.sticky-performance-employee { position: sticky; left: 0; z-index: 3; min-width: 175px; max-width: 175px; background: white; box-shadow: 8px 0 12px -12px rgba(16, 47, 37, .45); }
.controlling-employee-table thead .sticky-performance-employee { z-index: 5; background: #f6f8f7; }
.performance-number { min-width: 100px; text-align: right; }
.performance-number small { display: block; margin-top: .18rem; color: var(--muted); font-size: .66rem; font-weight: 500; }
.employee-month-performance { min-width: 112px; border-left: 4px solid transparent; text-align: right; }
.employee-month-performance span, .employee-month-performance small, .employee-month-performance strong { display: block; }
.employee-month-performance small, .employee-month-performance span { color: var(--muted); font-size: .68rem; }
.traffic-cell-green { border-left-color: #1c9b62; background: #edf8f2; }
.traffic-cell-yellow { border-left-color: #e6a817; background: #fff8e7; }
.traffic-cell-red { border-left-color: #c84545; background: #fff0f0; }
.traffic-cell-neutral { border-left-color: #94a3b8; background: #f7f9f8; }
.absence-filter-grid { display: grid; grid-template-columns: minmax(130px, .5fr) repeat(2, minmax(190px, 1fr)) minmax(210px, auto); gap: .9rem; align-items: end; }
.absence-filter-grid.is-year-view { grid-template-columns: minmax(130px, .5fr) minmax(220px, 1fr) minmax(210px, auto); }
.absence-filter-action { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.absence-stats { grid-template-columns: repeat(3, 1fr); }
.absence-calendar-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.absence-calendar-toolbar > div { text-align: center; }
.absence-calendar-toolbar h2 { margin: .15rem 0 0; }
.absence-month-calendar { min-width: 820px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.absence-calendar-card { overflow-x: auto; }
.absence-calendar-weekdays, .absence-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.absence-calendar-weekdays { background: var(--accent); }
.absence-calendar-weekdays span { padding: .55rem .3rem; color: var(--brand-dark); font-size: .76rem; font-weight: 800; text-align: center; }
.absence-calendar-day { min-height: 132px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: .4rem; }
.absence-calendar-day:last-child { border-right: 0; }
.absence-calendar-day.has-overlap { background: #fffaf0; box-shadow: inset 0 3px 0 #e6a817; }
.absence-calendar-date-row { display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.absence-calendar-date { display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; color: var(--muted); font-size: .76rem; font-weight: 800; }
.absence-calendar-day.is-today .absence-calendar-date { color: white; background: var(--brand); }
.absence-overlap-count { color: #8a5b00; font-size: .58rem; font-weight: 800; }
.absence-calendar-events { display: grid; gap: .24rem; margin-top: .28rem; }
.absence-calendar-event { display: grid; gap: .04rem; overflow: hidden; border-left: 3px solid #94a3b8; border-radius: 6px; background: #f2f5f3; padding: .3rem .35rem; font-size: .65rem; line-height: 1.25; }
.absence-calendar-event strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.absence-calendar-event span { color: var(--muted); font-size: .58rem; }
.absence-calendar-event.kind-vacation, .absence-kind-label.kind-vacation, .absence-total.kind-vacation { border-color: var(--brand); background: var(--accent); color: var(--brand-dark); }
.absence-calendar-event.kind-sick, .absence-kind-label.kind-sick, .absence-total.kind-sick { border-color: #c84545; background: #fdeaea; color: #8f2929; }
.absence-calendar-event.kind-other, .absence-kind-label.kind-other, .absence-total.kind-other { border-color: #58799b; background: #eaf1f8; color: #315a7d; }
.absence-list-heading { margin-top: .4rem; }
.absence-groups { display: grid; gap: 1rem; }
.absence-employee-card { margin-bottom: 0; padding: 0; overflow: hidden; }
.absence-employee-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; background: #fbfdfb; }
.absence-employee-heading h3 { margin: 0; }
.absence-employee-totals { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; flex-wrap: wrap; }
.absence-total, .absence-kind-label { display: inline-block; border: 1px solid transparent; border-radius: 999px; padding: .28rem .52rem; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.absence-range-table { min-width: 850px; }
.absence-range-table th, .absence-range-table td { padding: .72rem .8rem; vertical-align: middle; }
.grouped-source-note { color: var(--muted); font-size: .72rem; }
.vacation-year-overview { overflow: hidden; }
.vacation-year-balances { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.vacation-year-balances article { display: grid; gap: .16rem; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 11px; background: #f8fbff; padding: .7rem; }
.vacation-year-balances article > strong { margin-bottom: .16rem; }
.vacation-year-balances article span, .vacation-year-balances article small { color: var(--muted); font-size: .72rem; }
.vacation-year-balances article span b { color: var(--ink); font-size: .9rem; }
.vacation-year-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.vacation-year-month { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.vacation-year-month h3 { margin: 0; background: var(--accent); padding: .6rem .7rem; font-size: .95rem; text-align: center; }
.vacation-year-weekdays, .vacation-year-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.vacation-year-weekdays span { padding: .34rem .1rem; color: var(--muted); font-size: .58rem; font-weight: 850; text-align: center; }
.vacation-year-day { display: grid; align-content: start; gap: .12rem; min-width: 0; min-height: 68px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: .2rem; }
.vacation-year-day:last-child { border-right: 0; }
.vacation-year-day.outside-month { background: #f7f8f8; }
.vacation-year-day.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.vacation-year-day > strong { color: var(--muted); font-size: .62rem; }
.vacation-year-day > span { overflow: hidden; border-radius: 4px; background: #e6f1fb; padding: .1rem .16rem; color: var(--brand-dark); font-size: .5rem; font-weight: 750; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.my-absence-toolbar { padding: .85rem 1rem; }
.my-absence-toolbar form { display: flex; max-width: 420px; align-items: center; gap: .75rem; }
.my-absence-toolbar label { margin: 0; white-space: nowrap; }
.my-absence-toolbar select { min-width: 150px; }
.my-absence-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.my-absence-stats .stat-card small { display: block; margin-top: .28rem; color: var(--muted); font-size: .7rem; }
.my-absence-year-card { overflow: hidden; }
.my-absence-legend { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.my-absence-legend > span { border-left: 4px solid #94a3b8; border-radius: 6px; padding: .35rem .55rem; font-size: .72rem; font-weight: 800; }
.my-absence-legend .kind-vacation { border-color: var(--brand); background: var(--accent); color: var(--brand-dark); }
.my-absence-legend .kind-sick { border-color: #c84545; background: #fdeaea; color: #8f2929; }
.my-absence-legend .kind-other { border-color: #58799b; background: #eaf1f8; color: #315a7d; }
.my-absence-legend small { color: var(--muted); }
.my-absence-day-event { display: block; overflow: hidden; border-left: 3px solid #94a3b8; border-radius: 4px; padding: .1rem .16rem; font-size: .5rem; font-weight: 750; line-height: 1.2; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.my-absence-day-event.kind-vacation { border-color: var(--brand); background: var(--accent); color: var(--brand-dark); }
.my-absence-day-event.kind-sick { border-color: #c84545; background: #fdeaea; color: #8f2929; }
.my-absence-day-event.kind-other { border-color: #58799b; background: #eaf1f8; color: #315a7d; }
.my-absence-table { min-width: 780px; }
.my-absence-table td small { display: block; margin-top: .18rem; color: var(--muted); }
.absence-entry-form { gap: 1.2rem; }
.absence-entry-fields { display: grid; gap: .85rem; }
.absence-au-field > label { margin-bottom: .5rem; }
.absence-au-field #id_au_status { display: flex; align-items: center; gap: .65rem 1.5rem; flex-wrap: wrap; }
.absence-au-field #id_au_status > div { margin: 0; }
.absence-au-field #id_au_status label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 650; cursor: pointer; }
.absence-au-field #id_au_status input[type="radio"] { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--brand); }
.absence-au-field > small { display: block; margin-top: .45rem; color: var(--muted); }
.readonly-field { min-height: 45px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #f5f8f6; padding: .7rem .75rem; font-weight: 750; }
.absence-picker-section { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.absence-picker-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.absence-picker-toolbar > div { text-align: center; }
.absence-picker-toolbar h2 { margin: .15rem 0 0; }
.absence-picker-help { margin: 1rem 0 .7rem; border-radius: 9px; background: var(--accent); padding: .65rem .8rem; color: var(--muted); font-size: .82rem; }
.absence-picker-calendar { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; user-select: none; }
.absence-picker-weekdays, .absence-picker-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.absence-picker-weekdays { background: var(--accent); }
.absence-picker-weekdays span { padding: .55rem .3rem; color: var(--brand-dark); font-size: .76rem; font-weight: 800; text-align: center; }
.absence-picker-day { position: relative; min-height: 86px; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; background: white; padding: .42rem; color: var(--ink); font-weight: 500; text-align: left; touch-action: none; }
.absence-picker-day:nth-child(7) { border-right: 0; }
.absence-picker-day:hover { background: #f2f8f4; }
.absence-picker-day.is-non-working { background: #f3f5f6; color: #8a939e; }
.absence-picker-day.is-non-working:hover { background: #edf0f2; }
.absence-picker-day.has-existing-absence { background: #fff8e7; }
.absence-picker-day.is-selected-range { z-index: 1; background: #dceaf7; box-shadow: inset 0 0 0 1px #7ea9d1; }
.absence-picker-day.is-range-start, .absence-picker-day.is-range-end { background: #c9def2; box-shadow: inset 0 0 0 2px var(--brand); }
.absence-picker-date { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: var(--muted); font-size: .78rem; font-weight: 800; }
.absence-picker-day.is-today .absence-picker-date { color: white; background: var(--brand); }
.absence-picker-day > .calendar-school-holidays { width: 100%; }
.absence-picker-existing { display: block; border-left: 3px solid #e6a817; border-radius: 4px; background: #fff0c7; padding: .22rem .3rem; color: #7a5505; font-size: .6rem; line-height: 1.25; }
.absence-picker-non-working { color: #7a8490; font-size: .58rem; font-weight: 750; }
.absence-picker-selection { margin-top: .7rem; color: var(--brand-dark); font-weight: 800; }
.absence-ultimo-field { border: 1px solid #b7cde3; border-radius: 10px; background: var(--accent); padding: .8rem; }
.absence-ultimo-field label { display: flex; align-items: center; gap: .55rem; margin: 0; }
.absence-ultimo-field input { width: auto; margin: 0; accent-color: var(--brand); }
.absence-ultimo-field small { display: block; margin: .35rem 0 0 1.7rem; color: var(--muted); }
.absence-notification-section { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.absence-affected-list { display: grid; gap: .85rem; }
.absence-affected-appointment { border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; padding: .9rem; }
.absence-appointment-heading { display: grid; gap: .12rem; }
.absence-appointment-heading small { color: var(--muted); }
.absence-appointment-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .85rem 0 0; border: 0; padding: 0; }
.absence-appointment-actions legend { grid-column: 1 / -1; margin-bottom: .1rem; padding: 0; font-size: .78rem; font-weight: 800; }
.absence-appointment-actions label { display: flex; align-items: flex-start; gap: .5rem; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: white; padding: .65rem; cursor: pointer; }
.absence-appointment-actions label:has(input:checked) { border-color: var(--brand); background: var(--accent); box-shadow: inset 0 0 0 1px var(--brand); }
.absence-appointment-actions input { width: 1rem; height: 1rem; flex: 0 0 auto; margin: .15rem 0 0; padding: 0; accent-color: var(--brand); }
.absence-appointment-actions span { display: grid; gap: .12rem; }
.absence-appointment-actions small { color: var(--muted); font-size: .7rem; font-weight: 500; }
.absence-notification-fields { display: grid; grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr); gap: .75rem; margin-top: .75rem; }
.absence-message-field textarea { min-height: 96px; }
.controlling-matrix { min-width: 1900px; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.controlling-matrix th, .controlling-matrix td { padding: .58rem .62rem; vertical-align: middle; }
.sticky-controller-employee { position: sticky; left: 0; z-index: 3; min-width: 165px; max-width: 165px; background: white; }
.sticky-controller-office { position: sticky; left: 165px; z-index: 3; min-width: 100px; max-width: 100px; background: white; }
.sticky-controller-client { position: sticky; left: 265px; z-index: 3; min-width: 190px; max-width: 190px; background: white; box-shadow: 8px 0 12px -12px rgba(16, 47, 37, .45); }
thead .sticky-controller-employee, thead .sticky-controller-office, thead .sticky-controller-client { z-index: 5; background: #f6f8f7; }
.controller-month-cell { min-width: 88px; text-align: right; }
.controller-month-cell small, .controller-month-cell span { display: block; color: var(--muted); font-size: .68rem; }

.service-sheet-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.service-sheet-toolbar h1 { margin: .1rem 0; }
.service-sheet-controls { display: grid; grid-template-columns: auto minmax(280px, 420px) auto; align-items: end; justify-content: space-between; gap: 1rem; }
.service-sheet-controls form { margin: 0; }
.service-sheet-month-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
.service-sheet-history-note { border-left: 5px solid #e6a817; background: #fff8e7; }
.service-sheet-employee-edit-note { border-left: 5px solid var(--brand); background: #eef5fc; }
.service-sheet-preview-wrap { overflow-x: auto; margin-bottom: 1.5rem; padding: .5rem 0 1.2rem; }
.service-sheet-paper { position: relative; width: 1120px; min-height: 760px; margin: 0 auto; border: 1px solid #26322d; background: white; color: #111; box-shadow: 0 18px 44px rgba(19, 33, 27, .14); font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.service-sheet-draft-note { border-bottom: 1px solid #c89017; background: #fff3cf; padding: 6px 10px; color: #785300; font-weight: 700; text-align: center; }
.service-sheet-title { border-bottom: 2px solid #222; padding: 7px 9px; font-size: 16px; font-weight: 800; }
.service-sheet-meta { display: grid; grid-template-columns: 155px minmax(250px, .85fr) 150px minmax(330px, 1.15fr); }
.service-sheet-client { display: grid; grid-template-columns: 155px minmax(250px, 1fr); width: 53%; border-top: 10px solid #e7e7e7; }
.service-sheet-meta-label, .service-sheet-meta-value { min-height: 28px; border-right: 1px solid #222; border-bottom: 1px solid #222; padding: 6px 8px; }
.service-sheet-meta-label { font-weight: 750; }
.service-sheet-meta-value { overflow-wrap: anywhere; }
.service-sheet-table { table-layout: fixed; width: 100%; border-collapse: collapse; }
.service-sheet-table th, .service-sheet-table td { border-right: 1px solid #222; border-bottom: 1px solid #222; padding: 6px 7px; color: #111; text-transform: none; letter-spacing: 0; vertical-align: middle; }
.service-sheet-table th { height: 54px; background: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.service-sheet-table th:nth-child(1) { width: 10%; }
.service-sheet-table th:nth-child(2), .service-sheet-table th:nth-child(3) { width: 8%; }
.service-sheet-table th:nth-child(4) { width: 17%; }
.service-sheet-table th:nth-child(5) { width: 14%; }
.service-sheet-table th:nth-child(6) { width: 10%; }
.service-sheet-table th:nth-child(7) { width: 33%; }
.service-sheet-table tbody td { min-height: 34px; background: #d9d9d9; }
.service-sheet-table tbody tr:nth-child(even) td { background: #d2d2d2; }
.service-sheet-table .service-sheet-empty-row td { height: 34px; }
.service-sheet-table tfoot td { height: 34px; background: white; }
.service-sheet-total-label { text-align: right; font-weight: 750; }
.service-sheet-number { text-align: center; white-space: nowrap; }
.service-sheet-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 34px 22px 8px; }
.service-sheet-signatures div { display: grid; gap: 7px; text-align: center; }
.service-sheet-signatures span { display: block; min-height: 48px; border-bottom: 1px solid #222; }
.service-sheet-signatures strong { font-size: 11px; font-weight: 500; }
.service-sheet-footer { padding: 8px 12px 10px; color: #59615d; font-size: 9px; text-align: right; }
.service-sheet-status { display: flex; align-items: center; gap: .65rem; }
.service-sheet-status.status-submitted { border-left: 5px solid #e6a817; background: #fff8e7; }
.service-sheet-status.status-approved { border-left: 5px solid #1c9b62; background: #edf8f2; }
.service-sheet-offline-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-left: 5px solid #1c9b62; }
.service-sheet-offline-actions { display: grid; justify-items: end; gap: .45rem; min-width: 250px; }
.offline-sheet-status { color: var(--muted); font-size: .8rem; text-align: right; }
.service-sheet-offline-panel[data-offline-state="ready"], .service-sheet-offline-panel[data-offline-state="synced"] { background: #edf8f2; }
.service-sheet-offline-panel[data-offline-state="queued"] { border-left-color: #d79a12; background: #fff8e7; }
.service-sheet-offline-panel[data-offline-state="error"] { border-left-color: #c84545; background: #fff1f1; }
.offline-sheet-library { display: grid; gap: 1rem; }
.offline-sheet-list { display: grid; gap: .7rem; }
.offline-sheet-library-item { display: grid; gap: .2rem; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 10px; background: #fbfdfb; padding: .9rem 1rem; color: var(--ink); text-decoration: none; }
.offline-sheet-library-item:hover { border-color: var(--brand); background: #edf8f2; }
.offline-sheet-library-item small { color: var(--muted); }
.offline-dashboard-summary { margin: -.35rem 0 1rem; color: var(--muted); }
.offline-dashboard-summary[data-state="ready"] { color: #15784d; font-weight: 700; }
.offline-dashboard-summary[data-state="error"] { color: #b73535; font-weight: 700; }
.service-sheet-signatures img { display: block; width: auto; max-width: 90%; height: 44px; margin: 0 auto -48px; object-fit: contain; }
.service-sheet-management-review { margin-top: 1.5rem; }
.service-sheet-edit-note { width: min(1120px, 100%); margin: 0 auto 1rem; border-left: 5px solid var(--brand); background: #edf8f2; }
.service-sheet-table .service-sheet-edit-cell { padding: 4px; background: #eef8f2; vertical-align: top; }
.service-sheet-edit-cell input, .service-sheet-edit-cell textarea { width: 100%; min-width: 0; border: 1px solid #8eafd0; border-radius: 4px; background: #fff; padding: 5px; color: #111; font: inherit; }
.service-sheet-edit-cell input[type="date"] { min-width: 118px; }
.service-sheet-edit-cell input[type="time"] { min-width: 82px; }
.service-sheet-activity-cell { position: relative; }
.service-sheet-activity-cell .activity-autocomplete-wrap { margin-bottom: 4px; }
.service-sheet-activity-cell textarea { min-height: 48px; resize: vertical; }
.service-sheet-activity-cell small { display: block; margin-top: 3px; color: #51645b; font-size: 9px; }
.employee-service-sheet-activity .activity-autocomplete-wrap { margin-bottom: 5px; }
.employee-service-sheet-activity button { width: 100%; padding: 5px 7px; font-size: 10px; }
.service-sheet-edit-cell .errorlist { margin: 0 0 3px; padding: 3px 5px; border-radius: 3px; background: #fff0f0; color: #9e2222; font-size: 9px; }
.service-sheet-inline-save-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.service-sheet-inline-save-bar p { margin: .25rem 0 0; }
.employee-service-sheets-table td:first-child { min-width: 190px; }
.employee-service-sheets-table td:last-child { min-width: 230px; }
.employee-service-sheets-table td > small { display: block; margin-top: .2rem; color: var(--muted); }
.signature-pad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.signature-pad-field { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; padding: .9rem; }
.signature-pad-field > label { display: block; margin-bottom: .45rem; }
.signature-canvas { display: block; width: 100%; height: 150px; margin-top: .65rem; border: 2px solid #b7c8da; border-radius: 9px; background: white; touch-action: none; }
.signature-canvas[role="button"] { cursor: pointer; }
.signature-shortcuts .actions { display: flex; flex-wrap: wrap; }
.signature-shortcuts button { white-space: normal; }
body.signature-dialog-open { overflow: hidden; }
.signature-dialog { width: min(900px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 24px); box-sizing: border-box; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: white; color: var(--text); overflow-y: auto; overscroll-behavior: contain; }
.signature-dialog::backdrop { background: rgba(15, 30, 50, .65); }
.signature-dialog-heading, .signature-dialog-actions, .billing-demo-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.signature-dialog-heading h2 { margin: 0; font-size: 1.25rem; }
.signature-dialog p { margin: 10px 0; }
#signature-dialog-canvas { display: block; width: 100%; height: clamp(180px, 38dvh, 340px); box-sizing: border-box; border: 2px solid #b7c8da; border-radius: 8px; background: white; touch-action: none; }
.signature-dialog-error { color: #a02323; min-height: 1.2em; }
.billing-demo-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) {
  .signature-dialog { width: 100vw; max-height: 100dvh; margin: auto 0; border-radius: 0; padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left)); }
  .signature-dialog-heading h2 { font-size: 1rem; flex: 1; }
  .signature-shortcuts .actions { flex-direction: column; align-items: stretch; }
}
@media print { .signature-shortcuts, .signature-dialog { display: none !important; } }
.signature-pad-field .actions { margin-top: .55rem; }
.service-sheet-signatures .service-sheet-inline-signature { align-content: start; border-color: #acc7e1; background: #f7faff; padding: .7rem; }
.service-sheet-inline-signature > label { margin: 0; font-size: 10px; text-align: left; }
.service-sheet-inline-signature > input[type="text"] { padding: .42rem .5rem; font-size: 11px; }
.service-sheet-inline-signature .signature-canvas { height: 112px; margin-top: .15rem; border-width: 1px; border-radius: 5px; }
.service-sheet-inline-signature .actions { display: flex; justify-content: flex-end; margin-top: 0; }
.service-sheet-inline-signature .signature-clear { padding: .35rem .55rem; font-size: 10px; }
.service-sheet-submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.service-sheet-submit-bar > div:first-child { min-width: 260px; }
.service-sheet-submit-actions { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.signature-confirmation { display: flex; align-items: flex-start; gap: .55rem; margin: 1rem 0; border-radius: 9px; background: var(--accent); padding: .8rem; }
.signature-confirmation input { width: auto; margin-top: .18rem; accent-color: var(--brand); }
.service-sheet-review-queue { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.service-sheet-review-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 0; }
.service-sheet-review-card h2 { margin: .55rem 0 .25rem; }
.sheet-review-entry-list { display: grid; gap: 1rem; }
.sheet-review-entry { border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; padding: 1rem; }
.sheet-review-entry-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.sheet-review-entry-heading span, .sheet-review-entry > small { color: var(--muted); font-size: .8rem; }
.sheet-review-entry fieldset { margin: 0 0 .8rem; border: 1px solid var(--line); border-radius: 9px; padding: .75rem; }
.activity-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .45rem .75rem; }
.activity-checkbox-grid label { display: flex; align-items: flex-start; gap: .45rem; margin: 0; font-weight: 600; }
.activity-checkbox-grid input { width: auto; margin-top: .18rem; accent-color: var(--brand); }
.sheet-approve-form { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; border: 1px solid #a9d4bd; border-radius: 12px; background: #edf8f2; padding: 1rem; }
.sheet-approve-form > div { display: grid; gap: .15rem; }
.sheet-approve-form span { color: var(--muted); font-size: .82rem; }
.sheet-approved-summary { display: grid; gap: .3rem; overflow-wrap: anywhere; border-left: 5px solid #1c9b62; border-radius: 9px; background: #edf8f2; padding: 1rem; }

.inquiry-list-table { min-width: 1450px; }
.inquiry-filter-grid { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(2, minmax(180px, 1fr)) auto; gap: .9rem; align-items: end; }
.inquiry-list-table td > small, .inquiry-detail-list dd small, .inquiry-save-bar small { display: block; margin-top: .3rem; color: var(--muted); }
.inquiry-row-actions { min-width: 285px; }
.inquiry-row-actions .button { padding: .55rem .72rem; }
.inquiry-priority-normal { color: #315a7d; background: #eaf1f8; }
.inquiry-priority-high { color: #875d00; background: #fff0c7; }
.inquiry-priority-urgent { color: #9c2d2d; background: #fde2e2; }
.inquiry-status-accepted { color: #0f6842; background: #dcf4e8; }
.inquiry-status-rejected, .inquiry-status-closed { color: #9c2d2d; background: #fde2e2; }
.inquiry-status-waiting_documents, .inquiry-status-waiting_decision, .inquiry-status-waitlist { color: #7a5505; background: #fff0c7; }
.inquiry-follow-up-overdue { border-left: 4px solid var(--red); background: #fff4f3; }
.inquiry-follow-up-overdue > strong, .inquiry-follow-up-overdue > small:first-of-type { color: #9c2d2d; }
.inquiry-form-section .form-grid { gap: 1rem; }
.inquiry-form-section textarea { resize: vertical; }
.field-help { display: block; margin-top: .25rem; color: var(--muted); }
.inquiry-save-bar { position: sticky; z-index: 10; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-color: #aac5df; box-shadow: 0 -8px 24px rgba(20, 63, 120, .09); }
.inquiry-save-bar > div:first-child { display: grid; gap: .1rem; }
.inquiry-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.inquiry-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.inquiry-detail-list { margin: 0; }
.inquiry-detail-list > div { display: grid; grid-template-columns: minmax(145px, .75fr) minmax(0, 1.25fr); gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.inquiry-detail-list > div:last-child { border-bottom: 0; }
.inquiry-detail-list dt { color: var(--muted); font-weight: 750; }
.inquiry-detail-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.inquiry-text-block { margin-bottom: .85rem; border-left: 4px solid var(--brand-light); border-radius: 10px; background: var(--soft); padding: .8rem 1rem; }
.inquiry-text-block > span, .inquiry-timeline-entry div > span { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.inquiry-text-block p { margin: .35rem 0 0; }
.inquiry-progress-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.6fr); gap: 1.4rem; align-items: start; }
.inquiry-progress-form { border: 1px solid var(--line); border-radius: 14px; background: var(--soft); padding: 1rem; }
.inquiry-progress-form h3 { margin-top: 0; }
.inquiry-progress-form p { margin: 0 0 .8rem; }
.inquiry-timeline { display: grid; gap: .85rem; }
.inquiry-timeline-entry { position: relative; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 12px; background: white; padding: 1rem; }
.inquiry-timeline-entry header { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.inquiry-timeline-entry header span, .inquiry-timeline-entry > small { color: var(--muted); font-size: .8rem; }
.inquiry-timeline-entry > p { margin: .65rem 0; }
.inquiry-timeline-entry > div { margin: .65rem 0; border-radius: 8px; background: var(--accent); padding: .65rem .75rem; }
.inquiry-timeline-entry > div p { margin: .25rem 0 0; }
.inquiry-conversion-card { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; border-color: #a9d4bd; }
.inquiry-conversion-card h2 { margin: .2rem 0; }
.inquiry-conversion-card p { margin-bottom: 0; }

.appointment-choice-card { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; border-left: 6px solid var(--brand); }
.appointment-choice-card h2, .appointment-choice-card p { margin-bottom: 0; }
.appointment-address { color: var(--muted); }
.client-additional-addresses { display: grid; gap: 1rem; margin-top: .6rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.client-additional-address-list { display: grid; gap: .85rem; }
.client-additional-address-card { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 2fr) minmax(90px, .65fr) minmax(150px, 1fr) 74px; gap: .75rem; align-items: end; margin: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); padding: .9rem; }
.client-additional-address-card legend { padding: 0 .35rem; color: var(--brand-dark); font-weight: 800; }
.client-additional-address-card > div { display: grid; gap: .25rem; min-width: 0; }
.client-additional-address-card input { width: 100%; }
.client-additional-address-delete { grid-column: 1 / -1; justify-self: start; }
.case-additional-address-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; }
.case-additional-address-grid > div { display: grid; gap: .3rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); padding: .8rem; }
.case-additional-address-grid span { color: var(--muted); }
.map-popup-navigation-link { display: inline-flex; margin-top: .45rem; color: var(--brand); font-weight: 800; }
.appointment-series-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .65rem; }
.appointment-series-list > div { display: grid; gap: .15rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); padding: .75rem .85rem; }
.appointment-series-list > div.is-current { border-color: var(--brand); background: var(--accent); box-shadow: inset 4px 0 0 var(--brand); }
.appointment-series-list span, .appointment-series-list small { color: var(--muted); font-size: .75rem; }
.appointment-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.appointment-notes-field, .appointment-scope-field, .appointment-form-actions { grid-column: 1 / -1; }
.appointment-danger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.appointment-danger-grid .card { align-content: start; }
.appointment-danger-grid h2 { margin: .2rem 0 .4rem; }
.danger-button { color: white; background: var(--red); }
.danger-button:hover { background: #9f3030; }

/* Interner Teamchat */
.container:has(.chat-shell) { width: min(1580px, 96vw); margin-block: 1.15rem; }
.container:has(.chat-shell) + .systea-widget { display: none; }
.chat-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.chat-page-heading h1 { margin-bottom: .2rem; }
.chat-shell { display: grid; height: var(--chat-desktop-height, max(640px, calc(100dvh - 190px))); min-height: 0; grid-template-columns: minmax(340px, 30%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 18px 46px rgba(20, 63, 120, .09); }
.chat-sidebar { display: flex; min-width: 0; min-height: 0; height: 100%; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: #f8fafc; }
.chat-sidebar-heading { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--line); padding: 1rem 1.1rem; }
.chat-sidebar-heading > div { display: grid; gap: .18rem; }
.chat-sidebar-heading strong { font-size: 1.05rem; }
.chat-sidebar-heading small { color: var(--muted); }
.chat-lock { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent); font-size: .86rem; }
.chat-push-control { display: flex; align-items: center; justify-content: space-between; gap: .65rem; border-bottom: 1px solid var(--line); background: #edf5fd; padding: .7rem .85rem; }
.chat-push-control > div { display: grid; min-width: 0; gap: .12rem; }
.chat-push-control strong { color: var(--brand-dark); font-size: .78rem; }
.chat-push-control small { color: var(--muted); font-size: .68rem; line-height: 1.25; }
.chat-push-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .35rem; }
.chat-push-control button { flex: 0 0 auto; padding: .42rem .62rem; font-size: .7rem; }
.chat-push-control[data-push-state="enabled"] { background: #e8f6ee; }
.chat-push-control[data-push-state="enabled"] strong { color: #147846; }
.chat-push-control[data-push-state="denied"], .chat-push-control[data-push-state="unavailable"] { background: #f5f6f7; }
.chat-message-search { display: grid; flex: 0 0 auto; gap: .35rem; margin: 0; border-bottom: 1px solid var(--line); background: #f4f8fc; padding: .7rem .85rem; }
.chat-message-search label { color: var(--brand-dark); font-size: .7rem; font-weight: 850; }
.chat-message-search > div { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: .35rem; }
.chat-message-search input { min-width: 0; border-radius: 999px; background: white; padding: .58rem .8rem; }
.chat-message-search button { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; padding: 0; font-size: 1.15rem; }
.chat-message-search > a { justify-self: start; color: var(--brand); font-size: .7rem; font-weight: 800; }
.chat-search-results { display: flex; min-height: 0; flex: 1 1 0; flex-direction: column; overflow: hidden; background: white; }
.chat-search-results > header { display: grid; gap: .15rem; border-bottom: 1px solid var(--line); padding: .7rem .85rem; }
.chat-search-results > header strong { color: var(--ink); font-size: .84rem; }
.chat-search-results > header small { color: var(--muted); font-size: .7rem; }
.chat-search-results > div { min-height: 0; overflow-y: auto; }
.chat-search-result { display: grid; gap: .2rem; border-bottom: 1px solid var(--line); padding: .72rem .85rem; color: var(--ink); text-decoration: none; }
.chat-search-result:hover, .chat-search-result:focus-visible { background: var(--accent); }
.chat-search-result > span { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.chat-search-result > span strong { overflow: hidden; color: var(--brand-dark); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-search-result time { flex: 0 0 auto; color: var(--muted); font-size: .62rem; }
.chat-search-result > small { color: var(--brand); font-size: .66rem; font-weight: 800; }
.chat-search-result p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: .72rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.chat-search { display: block; margin: .8rem .85rem; }
.chat-search input { border-radius: 999px; background: white; padding: .62rem .85rem; }
.chat-thread-list { display: grid !important; min-height: 220px; flex: 1 1 0 !important; align-content: start; gap: 0 !important; max-height: none; overflow-y: auto; }
.chat-thread-row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: .7rem; border-top: 1px solid var(--line); padding: .75rem .85rem; color: var(--ink); text-decoration: none; }
.chat-thread-row:last-child { border-bottom: 1px solid var(--line); }
.chat-thread-row:hover, .chat-thread-row.is-active { background: #eaf2fb; }
.chat-thread-row.is-active { box-shadow: inset 4px 0 0 var(--brand); }
.chat-avatar { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #dce9f7; color: var(--brand-dark); font-size: .82rem; font-weight: 850; letter-spacing: .02em; }
.chat-avatar.is-group { background: var(--brand); color: white; }
.chat-avatar.is-large { width: 50px; height: 50px; flex: 0 0 auto; font-size: .9rem; }
.chat-thread-copy { display: grid; min-width: 0; gap: .2rem; }
.chat-thread-title-line { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.chat-thread-title-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-title-line time { flex: 0 0 auto; color: var(--muted); font-size: .67rem; }
.chat-thread-preview { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-preview.is-typing { display: flex; align-items: center; gap: .35rem; color: var(--brand); font-weight: 750; }
.chat-typing-dots { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.chat-typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: chat-typing-bounce 1.1s infinite ease-in-out; }
.chat-typing-dots i:nth-child(2) { animation-delay: .15s; }
.chat-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { opacity: .4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat-row-unread { display: grid; min-width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 999px; background: var(--brand); padding: 0 .32rem; color: white; font-size: .68rem; font-weight: 850; }
.chat-row-badges { display: grid; justify-items: end; gap: .22rem; }
.chat-row-mention { display: grid; min-width: 1.7rem; height: 1.35rem; place-items: center; border-radius: 999px; background: #9f2452; padding: 0 .38rem; color: white; font-size: .68rem; font-weight: 900; }
.nav-notification-badge[hidden], .chat-row-unread[hidden], .chat-row-mention[hidden], .chat-image-preview[hidden], .chat-file-preview[hidden], [data-chat-search-item][hidden] { display: none !important; }
.chat-directory { flex: 0 0 auto; margin-top: 0; border-top: 1px solid var(--line); }
.chat-directory > summary { padding: .85rem 1rem; color: var(--brand-dark); cursor: pointer; font-weight: 800; list-style: none; }
.chat-directory > summary::-webkit-details-marker { display: none; }
.chat-directory > summary::after { content: " +"; }
.chat-directory[open] > summary::after { content: " −"; }
.chat-directory-panel { max-height: min(330px, 34dvh); overflow-y: auto; border-top: 1px solid var(--line); background: white; }
.chat-people-list { display: grid; }
.chat-people-list form { margin: 0; border-top: 1px solid var(--line); }
.chat-person-row { display: grid; width: 100%; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: .65rem; border-radius: 0; background: white; padding: .65rem .85rem; color: var(--ink); text-align: left; }
.chat-person-row:hover { background: var(--accent); }
.chat-person-row .chat-avatar { width: 40px; height: 40px; }
.chat-person-row > span:nth-child(2) { display: grid; gap: .12rem; }
.chat-person-row small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.chat-empty-note { padding: .7rem 1rem; color: var(--muted); font-size: .82rem; }
.chat-main { display: grid; min-width: 0; min-height: 0; height: 100%; max-height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: #eef3f8; }
.chat-conversation-header { position: relative; z-index: 3; display: flex; min-height: 74px; align-items: center; gap: .8rem; border-bottom: 1px solid var(--line); background: white; padding: .75rem 1rem; box-shadow: 0 3px 12px rgba(20, 63, 120, .04); }
.chat-conversation-header h2 { margin: 0; font-size: 1.08rem; }
.chat-conversation-header small { color: var(--muted); }
.chat-conversation-meta { display: block; }
.chat-active-typing { display: flex; align-items: center; gap: .35rem; min-height: 1rem; color: var(--brand) !important; font-weight: 750; }
.chat-active-typing[hidden] { display: none; }
.chat-mobile-back { display: none; color: var(--brand-dark); font-size: 2rem; line-height: 1; text-decoration: none; }
.chat-member-menu { position: relative; margin-left: auto; }
.chat-delete-form { margin-left: .25rem; }
.chat-delete-form button { padding: .55rem .75rem; font-size: .78rem; }
.chat-member-menu + .chat-delete-form { margin-left: 0; }
.chat-member-menu > summary { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--accent); cursor: pointer; list-style: none; }
.chat-member-menu > summary::-webkit-details-marker { display: none; }
.chat-member-menu > div { position: absolute; z-index: 10; top: calc(100% + .45rem); right: 0; display: grid; width: min(310px, calc(100vw - 2rem)); max-height: 330px; overflow-y: auto; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 18px 40px rgba(20, 63, 120, .18); }
.chat-member-menu > div > strong { padding: .8rem .9rem; border-bottom: 1px solid var(--line); }
.chat-member-menu > div > span { display: grid; gap: .12rem; border-bottom: 1px solid var(--line); padding: .65rem .9rem; font-size: .82rem; }
.chat-member-menu > div small { color: var(--muted); }
.chat-member-menu > div > .chat-member-row { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.chat-member-row > span { display: grid; min-width: 0; gap: .12rem; }
.chat-member-row form { flex: 0 0 auto; margin: 0; }
.chat-member-remove { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #efc3c3; border-radius: 50%; background: #fff5f5; padding: 0; color: var(--red); font-size: 1.15rem; line-height: 1; }
.chat-member-remove:hover { background: var(--red); color: white; }
.chat-member-add { display: grid; gap: .45rem; margin: 0; border-top: 1px solid var(--line); background: var(--soft); padding: .75rem .9rem; }
.chat-member-add label { color: var(--brand-dark); font-size: .72rem; font-weight: 800; }
.chat-member-add > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.chat-member-add select { min-width: 0; padding: .5rem .55rem; font-size: .72rem; }
.chat-member-add button { padding: .5rem .6rem; font-size: .7rem; }
.chat-message-list { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: auto; scrollbar-gutter: stable; touch-action: pan-y; padding: 1.2rem clamp(.8rem, 2vw, 1.6rem); background-color: #eef3f8; background-image: radial-gradient(rgba(45, 110, 172, .08) .7px, transparent .7px); background-size: 18px 18px; }
.chat-bubble-row { display: flex; justify-content: flex-start; margin: .45rem 0; }
.chat-bubble-row.is-mine { justify-content: flex-end; }
.chat-bubble { width: fit-content; max-width: min(76%, 580px); border: 1px solid #d5e0ea; border-radius: 7px 17px 17px 17px; background: white; padding: .62rem .72rem .4rem; box-shadow: 0 3px 10px rgba(20, 63, 120, .06); }
.chat-bubble-row.is-mine .chat-bubble { border-color: #b9d4ef; border-radius: 17px 7px 17px 17px; background: #dfeefa; }
.chat-bubble-row.is-mentioned .chat-bubble { border-color: #c45a83; box-shadow: 0 0 0 2px rgba(159, 36, 82, .1), 0 5px 16px rgba(90, 25, 50, .12); }
.chat-bubble-row.is-search-focus .chat-bubble { border-color: #e2a40b; background: #fff7d8; box-shadow: 0 0 0 4px rgba(226, 164, 11, .22), 0 10px 30px rgba(20, 63, 120, .14); }
.chat-message-sender { display: block; margin-bottom: .28rem; color: var(--brand); font-size: .72rem; }
.chat-mentioned-label { display: inline-flex; margin-bottom: .3rem; border-radius: 999px; background: #f8e6ed; padding: .18rem .45rem; color: #862044; font-size: .62rem; font-weight: 900; }
.chat-bubble p { margin: 0; overflow-wrap: anywhere; line-height: 1.42; }
.chat-mention { border-radius: .32rem; background: #f4d6e2; padding: .04rem .2rem; color: #7d1d40; font-weight: 850; }
.chat-message-body a { color: #155fa0; font-weight: 750; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .14em; }
.chat-message-body a:hover { color: #0b467b; }
.chat-bubble time { display: block; margin-top: .28rem; color: var(--muted); font-size: .62rem; text-align: right; }
.chat-reply-reference { display: grid; gap: .12rem; margin-bottom: .45rem; border-left: 3px solid var(--brand); border-radius: 7px; background: rgba(255, 255, 255, .62); padding: .42rem .52rem; color: inherit; text-decoration: none; }
.chat-reply-reference:hover { background: white; }
.chat-reply-reference strong { color: var(--brand-dark); font-size: .68rem; }
.chat-reply-reference span { max-width: 420px; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-reaction-area { position: relative; display: flex; min-height: 26px; align-items: center; gap: .3rem; margin: .25rem 0 -.72rem; }
.chat-reaction-summary { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.chat-reaction-pill { position: relative; display: inline-flex; min-height: 25px; align-items: center; gap: .22rem; border: 1px solid #c9d8e6; border-radius: 999px; background: #f7fbff; padding: .16rem .4rem; color: var(--ink); font-size: .75rem; line-height: 1; }
.chat-reaction-pill .chat-reaction-count { color: var(--muted); font-size: .62rem; font-weight: 800; }
.chat-reaction-pill.is-mine { border-color: var(--brand); background: var(--accent); }
.chat-reaction-tooltip { position: absolute; z-index: 30; bottom: calc(100% + .45rem); left: 50%; display: none; width: max-content; max-width: min(280px, 78vw); transform: translateX(-50%); border-radius: 8px; background: #102b49; padding: .42rem .55rem; color: white; font-size: .67rem; font-weight: 750; line-height: 1.3; text-align: left; white-space: normal; box-shadow: 0 8px 22px rgba(16, 43, 73, .24); pointer-events: none; }
.chat-reaction-tooltip::after { position: absolute; top: 100%; left: 50%; width: 0; height: 0; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #102b49; content: ""; }
.chat-reaction-pill:hover .chat-reaction-tooltip,
.chat-reaction-pill:focus-visible .chat-reaction-tooltip { display: block; }
.chat-reaction-picker { position: relative; }
.chat-reaction-picker > summary { display: inline-flex; min-height: 25px; align-items: center; gap: .05rem; border: 1px solid transparent; border-radius: 999px; background: transparent; padding: .12rem .32rem; color: var(--muted); cursor: pointer; font-size: .78rem; list-style: none; }
.chat-reaction-picker > summary::-webkit-details-marker { display: none; }
.chat-reaction-picker > summary:hover { border-color: #c9d8e6; background: white; color: var(--brand-dark); }
.chat-reaction-picker > summary span { font-size: .62rem; font-weight: 900; }
.chat-reaction-picker > div { position: absolute; z-index: 15; bottom: calc(100% + .35rem); left: 0; display: flex; gap: .2rem; border: 1px solid var(--line); border-radius: 999px; background: white; padding: .3rem; box-shadow: 0 12px 30px rgba(20, 63, 120, .18); }
.chat-bubble-row.is-mine .chat-reaction-picker > div { right: 0; left: auto; }
.chat-reaction-picker button { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: transparent; padding: 0; font-size: 1rem; }
.chat-reaction-picker button:hover { background: var(--accent); }
.chat-reply-button { display: inline-flex; min-height: 25px; align-items: center; gap: .2rem; border: 1px solid transparent; border-radius: 999px; background: transparent; padding: .12rem .34rem; color: var(--muted); font-size: .67rem; font-weight: 800; }
.chat-reply-button:hover { border-color: #c9d8e6; background: white; color: var(--brand-dark); }
.chat-message-delete-button { display: inline-flex; min-height: 25px; align-items: center; gap: .2rem; border: 1px solid transparent; border-radius: 999px; background: transparent; padding: .12rem .34rem; color: var(--muted); font-size: .67rem; font-weight: 800; }
.chat-message-delete-button:hover { border-color: #e2b8bd; background: #fff4f5; color: var(--red); }
.chat-bubble-row.is-deleted .chat-bubble { opacity: .78; box-shadow: none; }
.chat-message-deleted { color: var(--muted); font-style: italic; }
.chat-image-link { position: relative; display: block; overflow: hidden; margin-bottom: .45rem; border-radius: 11px; background: #d8e3ed; color: white; cursor: zoom-in; }
.chat-image-link img { display: block; max-width: 100%; max-height: 360px; object-fit: contain; }
.chat-image-link > span { position: absolute; right: .45rem; bottom: .45rem; border-radius: 999px; background: rgba(10, 28, 48, .78); padding: .3rem .55rem; font-size: .65rem; font-weight: 800; }
.chat-document-card { display: grid; min-width: min(360px, 70vw); grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .65rem; margin-bottom: .45rem; border: 1px solid #bfd2e5; border-radius: 11px; background: #f7fbff; padding: .58rem; color: var(--ink); text-decoration: none; }
.chat-document-card:hover { border-color: var(--brand); background: var(--accent); }
.chat-document-card > span:nth-child(2) { display: grid; min-width: 0; gap: .08rem; }
.chat-document-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-document-card small { color: var(--muted); font-size: .68rem; }
.chat-document-icon, .chat-file-preview-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 9px; background: var(--brand); color: white; font-size: .72rem; font-weight: 900; }
.chat-document-download { color: var(--brand); font-size: .68rem; font-weight: 800; }
.chat-pdf-viewer[hidden] { display: none !important; }
.chat-pdf-viewer { position: fixed; z-index: 1010; inset: 0; display: grid; place-items: center; padding: clamp(.4rem, 1.5vw, 1rem); }
.chat-pdf-viewer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; background: rgba(7, 18, 31, .88); padding: 0; }
.chat-pdf-viewer-dialog { position: relative; display: grid; width: min(1240px, 100%); height: min(940px, calc(100dvh - 1.5rem)); grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(255, 255, 255, .25); border-radius: 18px; background: #f1f5f8; box-shadow: 0 28px 80px rgba(0, 0, 0, .48); }
.chat-pdf-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: white; padding: .7rem .85rem; }
.chat-pdf-viewer-header > div:first-child { display: grid; min-width: 0; gap: .1rem; }
.chat-pdf-viewer-header strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.chat-pdf-viewer-header small { color: var(--muted); }
.chat-pdf-viewer-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .4rem; }
.chat-pdf-viewer-actions .button { white-space: nowrap; }
.chat-pdf-viewer-close { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; background: var(--accent); padding: 0; color: var(--brand-dark); font-size: 1.35rem; }
.chat-pdf-viewer-body { min-height: 0; padding: .55rem; }
.chat-pdf-viewer-body iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 10px; background: white; }
body.chat-pdf-viewer-open { overflow: hidden; }
.chat-image-viewer[hidden] { display: none !important; }
.chat-compose-reply { display: flex; align-items: center; justify-content: space-between; gap: .65rem; border-left: 4px solid var(--brand); background: #edf5fd; padding: .5rem .7rem; }
.chat-compose-reply[hidden] { display: none !important; }
.chat-compose-reply > div { display: grid; min-width: 0; gap: .08rem; }
.chat-compose-reply strong { color: var(--brand-dark); font-size: .72rem; }
.chat-compose-reply span { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-compose-reply button { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: white; padding: 0; color: var(--muted); font-size: 1rem; }
.chat-image-viewer { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: clamp(.45rem, 2vw, 1.5rem); }
.chat-image-viewer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; background: rgba(7, 18, 31, .88); padding: 0; }
.chat-image-viewer-dialog { position: relative; display: grid; width: min(1180px, 100%); height: min(900px, calc(100dvh - 2rem)); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .22); border-radius: 18px; background: #111d2a; box-shadow: 0 28px 80px rgba(0, 0, 0, .45); }
.chat-image-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: white; padding: .65rem .8rem; }
.chat-image-viewer-header > div:first-child { display: grid; min-width: 0; gap: .1rem; }
.chat-image-viewer-title, .chat-image-viewer-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-image-viewer-header small { color: var(--muted); }
.chat-image-viewer-controls { display: flex; flex: 0 0 auto; align-items: center; gap: .3rem; }
.chat-image-viewer-controls button { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; background: var(--accent); padding: 0; color: var(--brand-dark); font-size: 1.1rem; }
.chat-image-viewer-controls button:disabled { opacity: .35; cursor: default; }
.chat-image-viewer-controls span { min-width: 58px; color: var(--muted); font-size: .72rem; font-weight: 800; text-align: center; }
.chat-image-viewer-controls .chat-image-viewer-close { background: var(--brand); color: white; font-size: 1.45rem; }
.chat-image-viewer-viewport { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; background-color: #111d2a; background-image: linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.035) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.035) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.035) 75%); background-position: 0 0, 0 10px, 10px -10px, -10px 0; background-size: 20px 20px; touch-action: pan-x pan-y; }
.chat-image-viewer-viewport img { display: block; width: 100%; max-width: none; height: auto; margin: 0 auto; user-select: none; -webkit-user-drag: none; }
.chat-image-viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: white; padding: .55rem .8rem; }
.chat-image-viewer-footer span { color: var(--muted); font-size: .72rem; }
.chat-image-viewer-footer .button { padding: .5rem .75rem; font-size: .72rem; }
body.chat-image-viewer-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .chat-typing-dots i { animation: none; opacity: .75; }
}
.chat-conversation-empty, .chat-welcome { display: grid; height: 100%; place-items: center; align-content: center; padding: 2rem; color: var(--muted); text-align: center; }
.chat-conversation-empty span, .chat-welcome-icon { font-size: 3rem; }
.chat-conversation-empty strong { margin-top: .65rem; color: var(--ink); }
.chat-conversation-empty p, .chat-welcome p { margin: .3rem 0 0; }
.chat-welcome h2 { margin: .7rem 0 0; color: var(--ink); }
.chat-welcome-features { display: flex; justify-content: center; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.chat-welcome-features span { border: 1px solid var(--line); border-radius: 999px; background: white; padding: .5rem .75rem; font-size: .75rem; }
.chat-composer { position: relative; flex: 0 0 auto; margin: 0; border-top: 1px solid var(--line); background: white; padding: .7rem .85rem .5rem; }
.chat-mention-picker { position: absolute; z-index: 30; right: .85rem; bottom: calc(100% - .1rem); left: 9.4rem; overflow: hidden; border: 1px solid #c9d8e6; border-radius: 14px; background: white; box-shadow: 0 18px 42px rgba(20, 63, 120, .2); }
.chat-mention-picker[hidden] { display: none !important; }
.chat-mention-picker > strong { display: block; border-bottom: 1px solid var(--line); padding: .55rem .7rem; color: var(--brand-dark); font-size: .72rem; }
.chat-mention-picker > div { display: grid; max-height: 220px; overflow-y: auto; }
.chat-mention-picker button { display: grid; width: 100%; gap: .08rem; border-radius: 0; border-bottom: 1px solid var(--line); background: white; padding: .52rem .7rem; color: var(--ink); text-align: left; }
.chat-mention-picker button:hover, .chat-mention-picker button.is-active { background: #eaf2fb; }
.chat-mention-picker button[hidden] { display: none; }
.chat-mention-picker button span { color: #862044; font-size: .78rem; font-weight: 850; }
.chat-mention-picker button small { color: var(--muted); font-size: .66rem; }
.chat-mention-help { display: block; background: #f8fafc; padding: .45rem .7rem; color: var(--muted); font-size: .63rem; }
.chat-compose-row { display: grid; grid-template-columns: 42px 42px 42px minmax(0, 1fr) 46px; align-items: end; gap: .42rem; }
.chat-compose-row textarea { min-height: 44px; max-height: 130px; resize: vertical; border-radius: 14px; padding: .65rem .8rem; }
.chat-emoji-picker { position: relative; }
.chat-emoji-picker > summary, .chat-image-button, .chat-file-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--brand-dark); cursor: pointer; font-size: 1.2rem; list-style: none; }
.chat-emoji-picker > summary::-webkit-details-marker { display: none; }
.chat-emoji-picker > div { position: absolute; z-index: 12; bottom: calc(100% + .6rem); left: 0; display: grid; width: 252px; grid-template-columns: repeat(6, 1fr); gap: .2rem; border: 1px solid var(--line); border-radius: 13px; background: white; padding: .55rem; box-shadow: 0 16px 36px rgba(20, 63, 120, .18); }
.chat-emoji-picker button { background: transparent; padding: .38rem; font-size: 1.15rem; }
.chat-emoji-picker button:hover { background: var(--accent); }
.chat-image-button input, .chat-file-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.chat-send-button { display: grid; width: 46px; height: 44px; place-items: center; border-radius: 50%; background: var(--brand); padding: 0; color: white; font-size: 1.1rem; }
.chat-send-button:hover { background: var(--brand-dark); }
.chat-send-error { margin: .4rem 0 0 8.55rem; border-radius: 8px; background: #fff1f1; padding: .45rem .6rem; color: var(--red); font-size: .72rem; font-weight: 750; }
.chat-compose-hint { display: block; margin: .35rem 0 0 8.55rem; color: var(--muted); font-size: .65rem; }
.chat-image-preview { display: grid; gap: .45rem; margin-bottom: .55rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); padding: .55rem; }
.chat-image-preview > strong { color: var(--ink); font-size: .76rem; }
.chat-image-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .45rem; }
.chat-image-preview-grid > div { position: relative; display: grid; min-width: 0; gap: .25rem; border-radius: 9px; background: white; padding: .3rem; box-shadow: 0 2px 8px rgba(18, 42, 68, .08); }
.chat-image-preview-grid img { width: 100%; height: 76px; border-radius: 7px; object-fit: cover; }
.chat-image-preview-grid span { overflow: hidden; padding: 0 .12rem; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-image-preview-grid button { position: absolute; top: .18rem; right: .18rem; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(16, 33, 51, .82); padding: 0; color: white; font-size: 1rem; line-height: 1; }
.chat-file-preview { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: .6rem; margin-bottom: .55rem; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); padding: .45rem; }
.chat-file-preview span:nth-child(2) { overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-preview button { background: transparent; padding: .35rem; color: var(--red); font-size: .7rem; }
.chat-group-create-card { max-width: 780px; }
.chat-participant-picker { margin: .4rem 0; border: 1px solid var(--line); border-radius: 13px; padding: 1rem; }
.chat-participant-picker legend { padding: 0 .4rem; font-weight: 800; }
.chat-participant-picker ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: 0; padding: 0; list-style: none; }
.chat-participant-picker label { display: flex; align-items: center; gap: .5rem; margin: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: .65rem; }

@media (max-width: 850px) {
  .chat-page-heading { align-items: flex-start; flex-direction: column; }
  .chat-shell { grid-template-columns: minmax(250px, 38%) minmax(0, 1fr); }
  .chat-bubble { max-width: 86%; }
  .my-absence-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .container:has(.chat-shell) { width: 100%; margin: 0; }
  .chat-page-heading { padding: 1rem; margin: 0; }
  .chat-page-heading .muted-line { display: none; }
  .chat-page-heading h1 { font-size: 1.45rem; }
  .chat-shell { display: block; height: auto; min-height: calc(100dvh - 150px); border-inline: 0; border-radius: 0; box-shadow: none; }
  .chat-sidebar { min-height: calc(100dvh - 150px); border-right: 0; }
  .chat-shell.has-open-thread .chat-sidebar { display: none; }
  .chat-shell:not(.has-open-thread) .chat-main { display: none; }
  body.chat-conversation-open { overflow: hidden; }
  .chat-shell.has-open-thread { position: fixed; z-index: 200; top: var(--chat-mobile-top, 0); right: 0; left: 0; width: 100%; height: var(--chat-mobile-height, 100dvh); min-height: 0; background: white; }
  .chat-main { height: 100%; min-height: 0; }
  .chat-mobile-back { display: block; }
  .chat-message-list { min-height: 0; overflow-y: scroll; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .chat-conversation-header { position: sticky; top: 0; }
  .chat-thread-list { max-height: none; }
  .chat-directory { margin-top: 0; }
  .chat-directory-panel { max-height: 420px; }
  .chat-bubble { max-width: 90%; }
  .chat-compose-hint { display: none; }
  .chat-composer { position: relative; z-index: 5; bottom: auto; padding-bottom: max(.55rem, env(safe-area-inset-bottom)); }
  .chat-mention-picker { right: .55rem; left: .55rem; }
  .chat-compose-row { grid-template-columns: 40px 40px 40px minmax(0, 1fr) 44px; }
  .chat-compose-row textarea { display: block; width: 100%; min-width: 0; font-size: 16px; }
  .chat-emoji-picker > summary, .chat-image-button, .chat-file-button { width: 40px; height: 40px; }
  .chat-participant-picker ul { grid-template-columns: 1fr; }
  .chat-image-viewer { padding: 0; }
  .chat-image-viewer-dialog { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .chat-image-viewer-header { align-items: flex-start; flex-direction: column; }
  .chat-image-viewer-header > div:first-child { width: 100%; }
  .chat-image-viewer-controls { width: 100%; justify-content: space-between; }
  .chat-image-viewer-footer span { display: none; }
  .chat-image-viewer-footer { justify-content: flex-end; }
  .employee-calendar-month-grid { display: none; }
  .employee-mobile-calendar-list, .agenda-mobile-event-list { display: grid; }
  .agenda-day-timeline { display: none; }
  .employee-calendar-toolbar { align-items: stretch; flex-wrap: wrap; }
  .employee-calendar-toolbar .admin-calendar-month-picker { width: 100%; order: -1; justify-content: space-between; }
  .employee-calendar-toolbar .admin-calendar-month-picker select { min-width: 0; flex: 1; }
  .calendar-workspace-primary, .calendar-workspace-actions { align-items: stretch; flex-direction: column; }
  .calendar-workspace-primary .button, .calendar-workspace-actions > .button, .calendar-colleague-picker { width: 100%; }
  .calendar-colleague-picker > form .actions { align-items: stretch; flex-direction: column; }
  .calendar-colleague-picker > form .actions > * { width: 100%; text-align: center; }
  .calendar-team-comparison { padding: .75rem; }
  .calendar-comparison-heading { flex-direction: column; }
  .calendar-comparison-grid { display: block; min-width: 0; border: 0; background: transparent; }
  .calendar-comparison-corner, .calendar-comparison-person { display: none; }
  .calendar-comparison-date { margin-top: .75rem; border: 1px solid var(--line); border-radius: 10px 10px 0 0; }
  .calendar-comparison-cell { border: 1px solid var(--line); border-top: 0; background: white; }
  .calendar-comparison-cell::before { content: attr(data-person); display: block; color: var(--brand-dark); font-size: .72rem; font-weight: 850; }
  .calendar-comparison-cell:last-of-type { border-radius: 0 0 10px 10px; }
  .my-absence-year-card { overflow-x: auto; }
  .my-absence-year-grid { min-width: 700px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The showcase has its own unmistakable green identity. The permanent banner
   prevents screenshots or exports from being confused with live client data. */
.demo-brand-mark {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 2px solid #fff;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(21, 91, 61, .2);
}
.demo-brand-name { color: var(--brand-dark); font-size: 1.08rem; font-weight: 900; white-space: nowrap; }
.demo-custom-logo { display: block; width: auto; height: 2.8rem; max-width: 11rem; object-fit: contain; }
.demo-environment-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 2.3rem;
  padding: .4rem 1rem;
  border-bottom: 1px solid #9bd0b3;
  background: #dff3e8;
  color: #0c5235;
  text-align: center;
}
.demo-environment-banner strong {
  border-radius: 999px;
  background: #197349;
  color: #fff;
  padding: .18rem .55rem;
  font-size: .78rem;
  letter-spacing: .08em;
}
.demo-login-note { display: grid; gap: .3rem; margin-bottom: 1rem; border: 1px solid #91c9aa; border-radius: 14px; background: #e8f6ee; color: #155b3d; padding: .85rem 1rem; }
.is-demo-environment .topbar { border-bottom-color: #a8d7bd; }
.is-demo-environment .primary,
.is-demo-environment .button.primary { background: var(--brand); }
.showcase-heading { align-items: flex-end; }
.showcase-settings-grid, .showcase-analytics-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.showcase-design-form input[type="color"] { width: 100%; min-height: 3.2rem; padding: .25rem; cursor: pointer; }
.showcase-design-form input[type="checkbox"] { width: auto; }
.showcase-preview { position: sticky; top: 1rem; }
.showcase-preview-brand { display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.showcase-preview-brand img { width: auto; height: 3.5rem; max-width: 12rem; object-fit: contain; }
.showcase-preview-brand span { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 16px; background: var(--preview-primary); color: #fff; font-size: 1.6rem; font-weight: 900; }
.showcase-preview-brand strong { color: var(--preview-dark); font-size: 1.25rem; }
.showcase-preview-card { margin: 1rem 0; border-radius: 16px; background: var(--preview-accent); padding: 1rem; }
.showcase-preview-card p { line-height: 1.5; }
.showcase-preview-card button { border: 0; border-radius: 9px; background: var(--preview-primary); padding: .65rem .9rem; color: #fff; font: inherit; font-weight: 800; }
.showcase-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .75rem; margin: 1rem 0; }
.showcase-metric-grid article { border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 14px; background: #fff; padding: .85rem; }
.showcase-metric-grid span { display: block; color: var(--muted); font-size: .75rem; }
.showcase-metric-grid strong { display: block; margin-top: .25rem; color: var(--brand-dark); font-size: 1.6rem; }
.showcase-analytics-grid table small { display: block; margin-top: .15rem; color: var(--muted); }
.showcase-latest-activity { margin-top: 1rem; }
.showcase-activity-list { display: grid; gap: .35rem; }
.showcase-activity-list > div { display: grid; grid-template-columns: minmax(10rem, .7fr) minmax(15rem, 1.4fr) auto; gap: .75rem; border-top: 1px solid var(--line); padding: .65rem 0; }
.showcase-activity-list > div:first-child { border-top: 0; }
.showcase-activity-list span, .showcase-activity-list time { color: var(--muted); font-size: .78rem; }
@media (max-width: 640px) {
  .demo-brand-name { display: none; }
  .demo-environment-banner { align-items: flex-start; font-size: .82rem; text-align: left; }
  .showcase-settings-grid, .showcase-analytics-grid { grid-template-columns: 1fr; }
  .showcase-preview { position: static; }
  .showcase-activity-list > div { grid-template-columns: 1fr; gap: .2rem; }
}

@media (max-width: 420px) {
  .chat-page-heading .button { width: 100%; text-align: center; }
  .chat-conversation-header { padding-inline: .65rem; }
  .chat-conversation-header .chat-avatar { display: none; }
  .chat-compose-row { grid-template-columns: 36px 36px 36px minmax(0, 1fr) 42px; gap: .28rem; }
  .chat-emoji-picker > summary, .chat-image-button, .chat-file-button { width: 36px; height: 40px; }
  .chat-document-card { min-width: min(300px, 82vw); grid-template-columns: 42px minmax(0, 1fr); }
  .chat-document-download { grid-column: 2; }
  .chat-emoji-picker > div { width: 236px; }
  .chat-message-list { padding-inline: .55rem; }
  .chat-image-viewer-controls button { width: 35px; height: 35px; }
  .chat-image-viewer-controls span { min-width: 48px; }
  .chat-pdf-viewer { padding: 0; }
  .chat-pdf-viewer-dialog { height: 100dvh; border: 0; border-radius: 0; }
  .chat-pdf-viewer-header { align-items: flex-start; }
  .chat-pdf-viewer-header > div:first-child small { display: none; }
  .chat-pdf-viewer-actions .button { padding: .55rem; font-size: .72rem; }
  .chat-pdf-viewer-actions [data-chat-pdf-download] { display: none; }
}

@media (max-width: 850px) {
  .inquiry-filter-grid { grid-template-columns: 1fr 1fr; }
  .inquiry-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inquiry-detail-columns, .inquiry-progress-layout { grid-template-columns: 1fr; }
  .inquiry-save-bar, .inquiry-conversion-card, .inquiry-timeline-entry header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .report-source-grid { grid-template-columns: 1fr; }
  .inquiry-filter-grid { grid-template-columns: 1fr; }
  .inquiry-summary-grid { grid-template-columns: 1fr; }
  .inquiry-detail-list > div { grid-template-columns: 1fr; gap: .2rem; }
  .secure-post-stats { grid-template-columns: 1fr; }
  .secure-post-row { grid-template-columns: 1fr; }
  .secure-post-facts > div { grid-template-columns: 1fr; gap: .15rem; }
  .secure-post-audit-list > div { grid-template-columns: 1fr; gap: .15rem; }
}

@media (max-width: 850px) {
  .topbar { align-items: flex-start; padding-block: 1rem; flex-wrap: wrap; gap: .8rem 1.3rem; }
  .brand-logo { width: 64px; }
  .employee-perspective-banner { align-items: flex-start; flex-direction: column; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .employee-main-nav, .admin-main-nav, .external-main-nav, .employee-desktop-account-link, .employee-desktop-logout, .admin-desktop-account-link, .admin-desktop-logout, .external-desktop-account-link, .external-desktop-logout { display: none !important; }
  .employee-mobile-nav, .admin-mobile-nav, .external-mobile-nav { position: relative; z-index: 80; display: block; margin-left: auto; }
  .employee-mobile-nav > summary, .admin-mobile-nav > summary, .external-mobile-nav > summary { display: grid; width: 46px; height: 42px; place-items: center; border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; background: rgba(255, 255, 255, .1); color: white; cursor: pointer; list-style: none; font-size: 1.15rem; font-weight: 900; letter-spacing: .09em; }
  .employee-mobile-nav > summary::-webkit-details-marker, .admin-mobile-nav > summary::-webkit-details-marker, .external-mobile-nav > summary::-webkit-details-marker { display: none; }
  .employee-mobile-nav[open] > summary, .admin-mobile-nav[open] > summary, .external-mobile-nav[open] > summary { background: rgba(255, 255, 255, .2); }
  .employee-mobile-menu, .admin-mobile-menu, .external-mobile-menu { position: absolute; z-index: 90; top: calc(100% + .55rem); right: 0; display: grid; width: min(320px, calc(100vw - 2rem)); max-height: calc(100vh - 105px); overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 45px rgba(7, 27, 20, .28); }
  .employee-mobile-menu a, .employee-mobile-menu form, .admin-mobile-menu a, .admin-mobile-menu form, .external-mobile-menu a, .external-mobile-menu form { border-bottom: 1px solid var(--line); }
  .employee-mobile-menu a, .admin-mobile-menu a, .external-mobile-menu a { padding: .78rem .95rem; color: var(--ink); font-weight: 700; text-decoration: none; }
  .employee-mobile-menu a:hover, .employee-mobile-menu a.is-active, .admin-mobile-menu a:hover, .admin-mobile-menu a.is-active, .external-mobile-menu a:hover { background: var(--accent); color: var(--brand-dark); }
  .employee-mobile-menu form, .admin-mobile-menu form, .external-mobile-menu form { margin: 0; }
  .employee-mobile-menu form:last-child, .admin-mobile-menu form:last-child, .external-mobile-menu form:last-child { border-bottom: 0; }
  .employee-mobile-menu .link-button, .admin-mobile-menu .link-button, .external-mobile-menu .link-button { width: 100%; padding: .78rem .95rem; color: var(--red); font-size: 1rem; font-weight: 750; text-align: left; }
  .mobile-menu-section { border-bottom: 1px solid var(--line); background: var(--soft); padding: .65rem .95rem .38rem; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .admin-nav-dropdown { right: auto; left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .case-status-grid, .quota-grid, .case-column-grid, .hours-entry-layout, .employee-calendar-layout, .fls-performance-grid, .authorization-fields-grid, .authorization-weekly-grid { grid-template-columns: 1fr; }
  .section-heading, .authorization-heading, .documentation-meta { align-items: flex-start; flex-direction: column; }
  .employee-preview-picker { grid-template-columns: 1fr; }
  .employee-perspective-form { align-items: flex-start; flex-direction: column; }
  .map-heading { align-items: flex-start; flex-direction: column; }
  .controlling-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .absence-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .absence-filter-grid.is-year-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .absence-employee-heading { align-items: flex-start; flex-direction: column; }
  .absence-employee-totals { justify-content: flex-start; }
  .absence-picker-day { min-height: 72px; }
  .service-sheet-toolbar { align-items: flex-start; flex-direction: column; }
  .service-sheet-controls { grid-template-columns: 1fr 1fr; }
  .service-sheet-controls form { grid-column: 1 / -1; grid-row: 1; }
  .employee-agenda-layout, .signature-pad-grid { grid-template-columns: 1fr; }
  .employee-calendar-layout .employee-calendar-main { order: -1; }
  .planning-calendar-grid { grid-template-columns: 1fr; }
  .calendar-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-calendar-week-grid { grid-template-columns: 1fr; }
  .team-vacation-week-grid, .team-vacation-month-grid { grid-template-columns: 1fr; }
  .vacation-year-balances, .vacation-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-invitation-list article, .internal-fls-credit-summary { align-items: flex-start; flex-direction: column; }
  .internal-credit-list { width: 100%; min-width: 0; }
  .employee-week-fls-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-employee-quick-row { grid-template-columns: 1fr; }
  .agenda-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .absence-notification-fields, .absence-appointment-actions { grid-template-columns: 1fr; }
  .two-factor-setup-grid { grid-template-columns: 1fr; }
  .review-employee-group > summary { align-items: flex-start; flex-direction: column; }
  .review-employee-heading-totals { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .review-employee-heading-totals > span:not(.status-badge) { text-align: left; }
  .backup-code-grid { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .service-sheet-review-card, .sheet-review-entry-heading, .sheet-approve-form, .service-sheet-submit-bar, .service-sheet-submit-actions, .service-sheet-inline-save-bar { align-items: flex-start; flex-direction: column; }
  .service-sheet-offline-panel { align-items: stretch; flex-direction: column; }
  .service-sheet-offline-actions { justify-items: stretch; min-width: 0; }
  .offline-sheet-status { text-align: left; }
  .assignment-bulk-form { width: 100%; min-width: 0; }
  .assignment-inline-form { align-items: stretch; flex-direction: column; }
  .assignment-inline-form select { width: 100%; min-width: 0; }
  .handover-evaluation > summary { align-items: flex-start; flex-direction: column; }
  #handover-map { min-height: 360px; }
  #case-map { min-height: 360px; }
  .employee-overview-heading, .employee-performance-card, .employee-task-grid, .employee-agenda-card .employee-week-fls-overview { display: none; }
  .employee-agenda-card { margin-top: 0; }
  .appointment-choice-card { align-items: flex-start; flex-direction: column; }
  .appointment-edit-form, .appointment-danger-grid { grid-template-columns: 1fr; }
  .appointment-notes-field, .appointment-scope-field, .appointment-form-actions { grid-column: 1; }
  .client-additional-address-card { grid-template-columns: 1fr; }
  .client-additional-address-delete { grid-column: 1; }
  .activity-summary-grid, .activity-card-facts, .personal-client-grid, .employee-presence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster-columns, .availability-calendar-grid, .client-unavailability-list { grid-template-columns: 1fr; }
  .activity-information-add-grid { grid-template-columns: 1fr; }
  .activity-information-links article { align-items: flex-start; flex-direction: column; }
  .secure-post-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secure-post-detail-grid { grid-template-columns: 1fr; }
  .secure-post-detail-grid > aside { position: static; }
  .secure-post-document-list > article, .secure-post-heading { align-items: flex-start; flex-direction: column; }
  .library-layout, .library-detail-grid { grid-template-columns: 1fr; }
  .library-folders { position: static; }
  .library-folders nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-document-list > article { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
  .library-document-thumbnail, .library-document-filemark, .library-folder-entry-mark { width: 72px; height: 62px; }
  .library-document-actions { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
  .library-own-invitation, .library-danger-zone { align-items: flex-start; flex-direction: column; }
  .calendar-period-navigation { align-items: stretch; flex-direction: column; text-align: center; }
  .client-unavailability-hint { align-items: stretch; flex-direction: column; }
  .activity-card-topline, .section-heading-row { align-items: flex-start; flex-direction: column; }
  .activity-deadline { text-align: left; }
  .employee-document-upload, .employee-folder-create { grid-template-columns: 1fr; }
  .employee-folder-create-form { grid-template-columns: 1fr; }
  .employee-document-item { grid-template-columns: 1fr; align-items: start; }
  .employee-document-actions { justify-content: flex-start; }
  .employee-document-move-form { width: 100%; flex-wrap: wrap; }
  .employee-document-move-form select { flex: 1; min-width: 180px; max-width: none; }
  .case-document-upload-card, .case-document-filter { grid-template-columns: 1fr; }
  .case-document-filter .actions { flex-wrap: wrap; }
  .client-search-filter { grid-template-columns: 1fr; }
  .case-document-item { grid-template-columns: 80px minmax(0, 1fr); align-items: start; }
  .case-document-thumbnail, .case-document-filemark { width: 80px; height: 68px; }
  .case-document-actions { grid-column: 1 / -1; max-width: none; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-employee-quick-weeks { grid-template-columns: 1fr; }
  .library-folders nav { grid-template-columns: 1fr; }
  .library-search-form { grid-template-columns: 1fr; }
  .library-reading-grid article { align-items: stretch; flex-direction: column; }
  .library-document-list > article { grid-template-columns: 1fr; }
  .library-document-actions { grid-column: 1; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .calendar-summary-grid { grid-template-columns: 1fr; }
  .team-vacation-heading { align-items: flex-start; flex-direction: column; }
  .team-vacation-week-day { grid-template-columns: 68px minmax(0, 1fr); }
  .team-vacation-month-day { min-height: 54px; }
  .calendar-invitation-list form { width: 100%; flex-wrap: wrap; }
  .hours-form-grid, .confirmation-fields, .calendar-time-fields { grid-template-columns: 1fr; }
  .hours-form-grid > div, .confirmation-fields > div { grid-column: 1; }
  .hours-client-accordion summary { grid-template-columns: 1fr 1fr; }
  .hours-client-name { grid-column: 1 / -1; }
  .controlling-filter-grid { grid-template-columns: 1fr; }
  .absence-filter-grid, .absence-stats { grid-template-columns: 1fr; }
  .absence-filter-grid.is-year-view, .vacation-year-balances, .vacation-year-grid { grid-template-columns: 1fr; }
  .absence-picker-toolbar { grid-template-columns: 1fr 1fr; }
  .absence-picker-toolbar > div { grid-column: 1 / -1; grid-row: 1; }
  .absence-picker-day { min-height: 58px; padding: .25rem; }
  .absence-picker-day .calendar-school-holiday { padding: .08rem .2rem; font-size: .48rem; }
  .absence-picker-existing { display: none; }
  .agenda-form-grid { grid-template-columns: 1fr; }
  .agenda-notes-field { grid-column: 1; }
  .backup-code-grid { grid-template-columns: 1fr 1fr; }
  .activity-summary-grid, .activity-card-facts, .personal-client-grid, .employee-presence-grid, .checkbox-card-list ul { grid-template-columns: 1fr; }
  .availability-calendar-day { min-height: 56px; padding: .2rem; }
  .availability-calendar-day small, .availability-calendar-day em { display: none; }
}

@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: white; }
  .topbar, .employee-perspective-banner, .message, .service-sheet-toolbar, .service-sheet-controls, .service-sheet-history-note { display: none !important; }
  .container { width: auto; margin: 0; }
  .service-sheet-preview-wrap { overflow: visible; margin: 0; padding: 0; }
  .service-sheet-paper { width: 100%; min-height: 0; margin: 0; border: 1px solid #111; box-shadow: none; font-size: 9px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .service-sheet-title { padding: 4px 6px; font-size: 13px; }
  .service-sheet-meta-label, .service-sheet-meta-value { min-height: 20px; padding: 3px 5px; }
  .service-sheet-client { border-top-width: 6px; }
  .service-sheet-table th { height: 38px; padding: 3px 4px; font-size: 8px; }
  .service-sheet-table td { padding: 3px 4px; }
  .service-sheet-table .service-sheet-empty-row td { height: 25px; }
  .service-sheet-table tfoot td { height: 25px; }
  .service-sheet-signatures { gap: 14px; padding: 18px 16px 5px; }
  .service-sheet-signatures span { min-height: 30px; }
  .service-sheet-footer { padding: 4px 8px 5px; font-size: 7px; }
}

/* Zentrale Vorbereitung der Teambesprechung */
.team-meeting-page-heading { align-items: flex-end; }
.team-meeting-stats { margin-bottom: 1.2rem; }
.team-meeting-layout { display: grid; grid-template-columns: minmax(290px, .72fr) minmax(0, 1.6fr); gap: 1.2rem; align-items: start; }
.team-topic-form-card, .team-topic-board { margin: 0; }
.team-topic-form { display: grid; gap: .9rem; }
.team-topic-participants { display: grid; gap: .45rem; }
.team-topic-participant-search { margin-bottom: .15rem; }
.team-topic-participant-options { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: .55rem .7rem; }
.team-topic-participant-options ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .18rem .65rem; margin: 0; padding: 0; list-style: none; }
.team-topic-participant-options label { display: flex; gap: .45rem; align-items: center; margin: 0; padding: .32rem .2rem; font-weight: 650; }
.team-topic-participant-options input { width: auto; flex: 0 0 auto; }
.team-topic-count { border-radius: 999px; background: var(--accent); color: var(--brand-dark); padding: .45rem .75rem; font-weight: 800; white-space: nowrap; }
.team-topic-sort-help { margin: -.1rem 0 .9rem; color: var(--muted); font-size: .9rem; }
.team-topic-list { display: grid; gap: .8rem; }
.team-topic-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: start; border: 1px solid var(--line); border-left: 5px solid #dfad26; border-radius: 14px; background: #fff; padding: .9rem; }
.team-topic-item.is-dragging { opacity: .48; border-style: dashed; }
.team-topic-item.priority-1 { border-left-color: #d64a4a; }
.team-topic-item.priority-3 { border-left-color: #78a7d3; }
.team-topic-leading-controls { display: grid; gap: .45rem; justify-items: center; }
.team-topic-drag-handle { display: grid; place-items: center; width: 34px; min-height: 27px; border-radius: 8px; color: #496b8c; background: #edf4fa; cursor: grab; font-size: 1.05rem; font-weight: 900; letter-spacing: -4px; padding-right: 4px; user-select: none; }
.team-topic-drag-handle:active { cursor: grabbing; }
.team-topic-check-form button { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #8aa7c5; border-radius: 9px; background: #fff; color: transparent; cursor: pointer; font-weight: 900; }
.team-topic-check-form button:hover, .team-topic-check-form button:focus-visible { border-color: var(--brand); background: var(--accent); color: var(--brand); }
.team-topic-body { min-width: 0; }
.team-topic-body header { display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: center; }
.team-topic-body h3 { margin: 0; font-size: 1.06rem; }
.team-topic-body p { margin: .55rem 0; color: var(--ink); overflow-wrap: anywhere; }
.team-topic-body > small { display: block; color: var(--muted); }
.team-topic-priority { border-radius: 999px; background: #f7e8bd; color: #6e5012; padding: .22rem .5rem; font-size: .77rem; font-weight: 850; white-space: nowrap; }
.team-topic-priority.priority-1 { background: #fde2e2; color: #972f2f; }
.team-topic-priority.priority-3 { background: #e5f0fa; color: #315f8c; }
.team-topic-people { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0; }
.team-topic-people span { border-radius: 999px; background: var(--accent); color: var(--brand-dark); padding: .28rem .52rem; font-size: .82rem; font-weight: 750; }
.team-topic-actions { display: grid; gap: .4rem; justify-items: end; font-size: .9rem; }
.team-topic-actions form { margin: 0; }
.team-topic-move-actions { display: flex; gap: .32rem; }
.team-topic-move-button { display: grid; place-items: center; width: 32px; height: 30px; padding: 0; border: 1px solid #a9bfd3; border-radius: 8px; color: var(--brand-dark); background: #edf4fa; cursor: pointer; font-size: 1rem; font-weight: 900; }
.team-topic-move-button:hover, .team-topic-move-button:focus-visible { border-color: var(--brand); background: var(--accent); }
.team-topic-completed { margin-top: 1.2rem; }
.team-topic-completed > summary { cursor: pointer; color: var(--brand-dark); font-size: 1.02rem; font-weight: 850; }
.team-topic-completed-list { display: grid; gap: .55rem; margin-top: .8rem; }
.team-topic-completed-list article { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border-top: 1px solid var(--line); padding-top: .65rem; }
.team-topic-completed-list strong, .team-topic-completed-list small { display: block; }
.team-topic-completed-list small { margin-top: .18rem; color: var(--muted); }
.calendar-team-agenda-field { border: 1px solid #b8cee4; border-radius: 12px; background: #f2f7fc; padding: .75rem; }
.calendar-team-agenda-field .inline-help-link { display: inline-block; margin-top: .45rem; font-size: .86rem; font-weight: 750; }

@media (max-width: 900px) {
  .team-meeting-layout { grid-template-columns: 1fr; }
  .team-topic-form-card { order: 2; }
  .team-topic-board { order: 1; }
}
@media (max-width: 640px) {
  .team-topic-participant-options ul { grid-template-columns: 1fr; }
  .team-topic-item { grid-template-columns: auto minmax(0, 1fr); }
  .team-topic-actions { grid-column: 2; grid-auto-flow: column; justify-content: start; justify-items: start; }
  .team-topic-completed-list article { align-items: flex-start; flex-direction: column; }
}

/* Self-hosted video conference */
.calendar-conference-field {
  padding: .8rem;
  border: 1px solid #9bb8d5;
  border-radius: 12px;
  background: #eef5fb;
}
.calendar-conference-field small { display: block; margin-top: .35rem; color: var(--muted); }
.conference-page-heading { align-items: center; }
.conference-privacy-note,
.conference-guest-link-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: .9rem 1rem;
  border: 1px solid #9bb8d5;
  border-radius: 14px;
  background: #eef5fb;
  color: var(--brand-dark);
}
.conference-privacy-note span,
.conference-guest-link-card span { color: var(--muted); }
.conference-guest-link-card > div:first-child { display: grid; gap: .2rem; }
.conference-copy-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: .55rem; min-width: min(100%, 640px); }
.conference-copy-row input { min-width: 0; }
.service-sheet-link-ready-card .section-heading { margin-bottom: 0; }
.service-sheet-link-ready-card .section-heading > div { min-width: 0; }
.service-sheet-link-dialog { width: min(760px, calc(100vw - 32px)); }
.service-sheet-link-copy-row { grid-template-columns: minmax(260px, 1fr) auto auto; width: 100%; }
.service-sheet-link-copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.service-sheet-link-dialog-actions { margin-top: 1rem; }
.conference-frame-card {
  overflow: hidden;
  height: min(74vh, 820px);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #17212b;
  box-shadow: var(--shadow);
}
.conference-frame { width: 100%; height: 100%; border: 0; background: #17212b; }
@media (max-width: 850px) {
  .container.has-section-navigation { display: block; }
  .section-navigation { position: sticky; top: 0; margin: 0 0 .8rem; }
  .section-navigation-desktop { display: none; }
  .section-navigation-mobile { display: block; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 6px 18px rgba(20, 63, 120, .08); }
  .section-navigation-mobile > summary { display: flex; align-items: center; justify-content: space-between; padding: .75rem .9rem; cursor: pointer; color: var(--brand-dark); font-weight: 850; list-style: none; }
  .section-navigation-mobile > summary::-webkit-details-marker { display: none; }
  .section-navigation-mobile[open] > summary span:last-child { transform: rotate(90deg); }
  .section-navigation-mobile nav { display: grid; padding: 0 .55rem .6rem; }
  .section-navigation-mobile nav a { padding: .65rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
  .section-navigation-mobile nav a.is-active { background: var(--accent); color: var(--brand-dark); }
  .library-folder-admin-grid { grid-template-columns: 1fr; }
  .conference-page-heading,
  .conference-privacy-note,
  .conference-guest-link-card { align-items: stretch; flex-direction: column; }
  .conference-page-heading .actions { width: 100%; }
  .conference-page-heading .actions .button { flex: 1; text-align: center; }
  .conference-copy-row { grid-template-columns: 1fr; min-width: 0; }
  .service-sheet-link-copy-row { grid-template-columns: 1fr; }
  .service-sheet-link-copy-row button { width: 100%; }
  .conference-frame-card { height: calc(100dvh - 250px); min-height: 520px; border-radius: 12px; }
}
.school-report-filter {
  display: flex;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.school-report-filter > div { flex: 1; }
.school-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.25rem 0;
}
.school-report-summary > div {
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand, #2f75b5);
  border-radius: 14px;
  padding: .9rem;
}
.school-report-summary span, .school-report-summary small { display: block; }
.school-report-summary strong { display: block; font-size: 1.45rem; margin: .15rem 0; }
.school-report-summary .school-report-total { background: #eaf3fb; }
.school-holiday-row { background: #fff6da; }
.maintenance-worktime-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.maintenance-worktime-entry + .maintenance-worktime-entry { border-top: 1px solid var(--line); margin-top: .45rem; padding-top: .45rem; }
.maintenance-worktime-entry small { display: block; color: var(--muted); margin-top: .2rem; }
.maintenance-worktime-entry .status-badge { display: inline-block; margin-left: .25rem; }
.maintenance-time-confirmation form { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 900px) {
  .school-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-report-filter { align-items: stretch; flex-direction: column; }
  .maintenance-worktime-table { min-width: 980px; }
}

/* Systea: lightweight, browser-native assistant and mascot. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.systea-widget { position: fixed; z-index: 120; right: max(1.25rem, env(safe-area-inset-right)); bottom: max(1.15rem, env(safe-area-inset-bottom)); font-size: 15px; }
.systea-widget[hidden], .systea-planning-card[hidden] { display: none !important; }
.systea-planning-card { position: absolute; right: 0; bottom: calc(100% + .85rem); width: min(390px, calc(100vw - 2.5rem)); max-height: calc(100dvh - 7rem); overflow-y: auto; background: #fff; color: var(--ink, #122033); border: 1px solid #bfd2e5; border-radius: 18px; box-shadow: 0 16px 45px rgba(20,63,120,.24); }
.systea-planning-content { padding: 1rem 1.15rem .25rem; line-height: 1.5; }
.systea-planning-content p { margin: .6rem 0; }
.systea-weekly-case-list { margin: .75rem 0 .25rem; padding-left: 1.35rem; font-weight: 750; }
.systea-weekly-case-list li + li { margin-top: .28rem; }
.systea-widget.has-weekly-case-reminder > .systea-launcher { visibility: hidden; pointer-events: none; }
.systea-planning-actions { display: flex; flex-wrap: wrap; gap: .55rem; padding: .75rem 1.15rem 1rem; }
.systea-planning-actions .button, .systea-planning-actions button { white-space: normal; min-height: 44px; font-size: .9rem; }
.systea-speech-bubble { position: absolute; z-index: 3; right: calc(100% - 58px); bottom: calc(100% + .75rem); width: min(300px, calc(100vw - 2rem)); border: 1px solid #bfd2e5; border-radius: 17px 17px 17px 5px; background: #fff; padding: .78rem .9rem; color: var(--ink, #122033); box-shadow: 0 12px 32px rgba(20,63,120,.2); font: inherit; line-height: 1.35; text-align: left; cursor: pointer; opacity: 0; transform: translateY(8px) scale(.97); transform-origin: calc(100% - 26px) 100%; transition: opacity .2s ease, transform .2s ease; }
.systea-speech-bubble.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.systea-speech-bubble::after { content: ""; position: absolute; z-index: 2; right: 16px; bottom: -10px; width: 18px; height: 18px; border-right: 2px solid #9fbcda; border-bottom: 2px solid #9fbcda; background: #fff; transform: rotate(45deg) skew(-7deg, -7deg); }
.systea-speech-bubble span, .systea-speech-bubble strong { position: relative; z-index: 1; display: block; }
.systea-speech-bubble strong { margin-top: .35rem; color: #2f75b5; font-size: .82rem; }
.systea-launcher { position: relative; z-index: 1; display: flex; align-items: center; gap: .55rem; border: 0; border-radius: 999px; padding: .28rem .85rem .28rem .24rem; background: #fff; color: var(--brand-dark, #143f78); box-shadow: 0 8px 28px rgba(20, 63, 120, .24); font: inherit; font-weight: 800; cursor: pointer; }
.systea-launcher:hover, .systea-launcher:focus-visible { box-shadow: 0 10px 34px rgba(20, 63, 120, .34); transform: translateY(-1px); outline: 3px solid rgba(47, 117, 181, .22); }
.systea-launcher { touch-action: none; }
.systea-widget.is-dragging, .systea-widget.is-dragging .systea-launcher { cursor: grabbing; user-select: none; }
.systea-widget.is-dragging .systea-launcher { transform: none; box-shadow: 0 14px 38px rgba(20, 63, 120, .34); }
.systea-mascot { display: block; width: 52px; height: 60px; transform-origin: 50% 100%; }
.systea-mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.systea-head, .systea-body { fill: #659bd0; stroke: #143f78; stroke-width: 3; }
.systea-body { fill: #eaf3fb; }
.systea-eye { fill: #143f78; transform-box: fill-box; transform-origin: center; transition: transform .2s ease; }
.systea-smile, .systea-arm path, .systea-foot, .systea-antenna { fill: none; stroke: #143f78; stroke-width: 3; stroke-linecap: round; }
.systea-arm circle, .systea-antenna-dot { fill: #659bd0; stroke: #143f78; stroke-width: 2; }
.systea-arm { transform-box: fill-box; transform-origin: top center; }
.systea-arm-right { transform-box: view-box; transform-origin: 74px 66px; }
.systea-orbit circle, .systea-orbit path { fill: none; stroke: #2f75b5; stroke-width: 2; }
.systea-animation-full .systea-mascot { animation: systea-float 3.6s ease-in-out infinite; }
.systea-animation-full.is-winking .systea-eye-right { animation: systea-wink .24s ease-in-out 1; }
.systea-animation-full.is-waving .systea-arm-right { animation: systea-wave 2.25s ease-in-out 1; }
.systea-animation-full.is-looking-left .systea-eye { transform: translateX(-1.7px); }
.systea-animation-full.is-looking-right .systea-eye { transform: translateX(1.7px); }
.systea-animation-full.is-looking-up .systea-eye { transform: translateY(-1.4px); }
.systea-animation-full.is-looking-down .systea-eye { transform: translateY(1.8px); }
.systea-animation-full.is-speaking .systea-smile { animation: systea-talk .55s ease-in-out infinite; }
.systea-animation-full.is-speaking .systea-orbit { transform-box: fill-box; transform-origin: center; animation: systea-orbit-pulse .9s ease-in-out infinite; }
.systea-animation-subtle .systea-mascot { animation: systea-float 5.5s ease-in-out infinite; }
.systea-widget.is-thinking .systea-mascot { animation: systea-think 1.4s ease-in-out infinite; }
@keyframes systea-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
@keyframes systea-wink { 0%, 100% { transform: scaleY(1); } 45%, 65% { transform: scaleY(.12); } }
@keyframes systea-wave { 0%, 100% { transform: rotate(0); } 25%, 43%, 61%, 79% { transform: rotate(-104deg); } 34%, 52%, 70% { transform: rotate(-88deg); } }
@keyframes systea-think { 0%, 100% { transform: rotate(-1deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-3px); } }
@keyframes systea-talk { 0%, 100% { stroke-width: 3; } 50% { stroke-width: 4.5; } }
@keyframes systea-orbit-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.systea-panel { position: absolute; right: 0; bottom: calc(100% + .8rem); display: grid; grid-template-rows: auto minmax(160px, 1fr) auto auto auto; width: min(390px, calc(100vw - 2rem)); max-height: min(680px, calc(100vh - 7rem)); overflow: hidden; border: 1px solid #cbd9e8; border-radius: 22px; background: #fff; box-shadow: 0 18px 55px rgba(16, 43, 74, .28); }
.systea-panel[hidden] { display: none; }
.systea-panel-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; padding: .8rem 1rem; background: linear-gradient(135deg, #143f78, #2f75b5); color: #fff; }
.systea-panel-header strong, .systea-panel-header small { display: block; }
.systea-panel-header strong { font-size: 1.08rem; }
.systea-panel-header small { opacity: .82; }
.systea-panel-avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid rgba(255,255,255,.86); border-radius: 13px; font-weight: 900; transform: rotate(-4deg); }
.systea-icon-button { border: 0; background: transparent; color: #fff; padding: .15rem .35rem; font-size: 1.65rem; line-height: 1; cursor: pointer; }
.systea-messages { min-height: 180px; overflow-y: auto; padding: 1rem; background: #f6f9fd; overscroll-behavior: contain; }
.systea-message { width: fit-content; max-width: 88%; margin: 0 0 .75rem; border-radius: 16px; padding: .7rem .85rem; box-shadow: 0 1px 2px rgba(20,63,120,.08); }
.systea-message.has-results { width: min(100%, 310px); }
.systea-message p { margin: 0; white-space: pre-line; line-height: 1.42; }
.systea-message-user { margin-left: auto; border-bottom-right-radius: 5px; background: #2f75b5; color: #fff; }
.systea-message-assistant { border: 1px solid #d8e4f0; border-bottom-left-radius: 5px; background: #fff; color: var(--ink, #122033); }
.systea-message-assistant.is-streaming p::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -.12em; border-radius: 2px; background: #2f75b5; animation: systea-caret .75s steps(1) infinite; }
@keyframes systea-caret { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
.systea-response-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.systea-response-actions a, .systea-response-actions button, .systea-more-button { border: 1px solid #a8c3de; border-radius: 999px; background: #f6fafe; padding: .34rem .62rem; color: #174f89; font: inherit; font-size: .82rem; font-weight: 750; line-height: 1.25; text-align: left; text-decoration: none; cursor: pointer; }
.systea-response-actions a:hover, .systea-response-actions button:hover, .systea-more-button:hover { border-color: #2f75b5; background: #eaf3fb; }
.systea-message-details { margin-top: .55rem; border-top: 1px solid #e1eaf4; padding-top: .55rem; }
.systea-message-details[hidden] { display: none; }
.systea-more-button { margin-top: .62rem; background: #fff; }
.systea-result-list { display: grid; gap: .38rem; margin-top: .65rem; }
.systea-result-heading { color: #5c6f83; font-size: .75rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.systea-result-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .15rem .55rem; border: 1px solid #bfd2e5; border-radius: 12px; background: #f6fafe; padding: .55rem .65rem; color: #143f78; text-decoration: none; }
.systea-result-card:hover, .systea-result-card:focus-visible { border-color: #2f75b5; background: #eaf3fb; outline: 2px solid rgba(47,117,181,.16); }
.systea-result-card strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.systea-result-card small { grid-column: 1; color: #607386; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.systea-result-card > span { grid-column: 2; grid-row: 1 / span 2; font-size: 1.08rem; }
.systea-thinking { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; min-width: 58px; }
.systea-thinking p { transition: opacity .13s ease, transform .13s ease; }
.systea-thinking p.is-changing { opacity: 0; transform: translateY(2px); }
.systea-thinking-dots { display: flex; align-items: center; gap: .3rem; min-height: 9px; }
.systea-thinking-dots span { width: 7px; height: 7px; border-radius: 50%; background: #659bd0; animation: systea-dots 1.15s ease-in-out infinite; }
.systea-thinking-dots span:nth-child(2) { animation-delay: .15s; }
.systea-thinking-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes systea-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.systea-quick-questions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; overflow: visible; padding: .65rem .75rem .15rem; background: #fff; }
.systea-quick-questions[hidden] { display: none; }
.systea-quick-questions button { min-width: 0; border: 1px solid #b8cde2; border-radius: 14px; background: #eef5fb; color: #143f78; padding: .45rem .55rem; font: inherit; font-size: .79rem; font-weight: 750; line-height: 1.2; white-space: normal; cursor: pointer; }
.systea-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .55rem; padding: .7rem .75rem; background: #fff; }
.systea-form textarea { width: 100%; min-height: 48px; max-height: 125px; resize: vertical; border: 1px solid #b8c9dc; border-radius: 13px; padding: .65rem .72rem; font: inherit; line-height: 1.3; }
.systea-send { min-height: 46px; border: 0; border-radius: 12px; background: #2f75b5; color: #fff; padding: .55rem .72rem; font: inherit; font-weight: 800; cursor: pointer; }
.systea-send:disabled { opacity: .5; cursor: wait; }
.systea-panel-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e1e9f2; padding: .48rem .85rem .58rem; color: #52667b; font-size: .78rem; }
.systea-panel-footer a, .systea-panel-footer .link-button { color: #315f8d; font-size: inherit; }
.systea-settings-card { max-width: 760px; }
.systea-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--line); padding: 1rem 0; cursor: pointer; }
.systea-setting-row span, .systea-setting-row small { display: block; }
.systea-setting-row small { margin-top: .2rem; color: var(--muted); }
.systea-setting-row input { width: 1.35rem; height: 1.35rem; flex: 0 0 auto; }
.systea-settings-card select { max-width: 340px; margin-top: .45rem; }
.systea-tone-options { margin: 1.2rem 0; padding: 0; border: 0; }
.systea-tone-options legend { margin-bottom: .15rem; }
.systea-tone-options > .muted-line { margin: .15rem 0 .75rem; }
.systea-tone-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.systea-tone-option { display: flex; align-items: flex-start; gap: .65rem; min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: .8rem; background: #fff; cursor: pointer; }
.systea-tone-option:has(input:checked) { border-color: var(--brand); background: var(--accent); box-shadow: 0 0 0 1px var(--brand); }
.systea-tone-option input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; flex: 0 0 auto; }
.systea-tone-option span, .systea-tone-option small { display: block; }
.systea-tone-option small { margin-top: .22rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 640px) {
  .systea-widget { right: max(.7rem, env(safe-area-inset-right)); bottom: max(.65rem, env(safe-area-inset-bottom)); }
  .systea-launcher-label { display: none; }
  .systea-launcher { padding: .18rem; }
  .systea-mascot { width: 49px; height: 56px; }
  .systea-panel { position: fixed; top: var(--systea-mobile-top, max(.55rem, env(safe-area-inset-top))); right: max(.55rem, env(safe-area-inset-right)); bottom: auto; left: max(.55rem, env(safe-area-inset-left)); width: auto; height: var(--systea-mobile-height, calc(100dvh - 1.1rem)); max-height: none; border-radius: 18px; }
  .systea-widget.is-open .systea-launcher { display: none; }
  .systea-messages { min-height: 0; }
  .systea-panel-header { padding: .7rem .8rem; }
  .systea-quick-questions { padding-right: max(.7rem, env(safe-area-inset-right)); padding-left: max(.7rem, env(safe-area-inset-left)); }
  .systea-form { padding-right: max(.7rem, env(safe-area-inset-right)); padding-bottom: max(.7rem, env(safe-area-inset-bottom)); padding-left: max(.7rem, env(safe-area-inset-left)); }
  .systea-form textarea { max-height: 96px; resize: none; }
  .systea-panel-footer { padding-bottom: max(.58rem, env(safe-area-inset-bottom)); }
  .systea-message { max-width: 94%; }
  .systea-response-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .systea-response-actions > * { display: flex; align-items: center; justify-content: center; min-height: 40px; text-align: center; }
  .systea-setting-row { align-items: flex-start; }
  .systea-tone-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .systea-widget *, .systea-widget *::before, .systea-widget *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print { .systea-widget { display: none !important; } }

/* Erstattungsbelege: private Monatsordner und lesende Buchhaltungsansicht. */
.expense-year-picker { display: flex; align-items: end; gap: .55rem; }
.expense-preview-launcher { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr) auto; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.expense-preview-launcher h2 { margin: .15rem 0 .35rem; }
.expense-preview-launcher > .button { justify-self: end; }
.expense-preview-form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: end; gap: .55rem; }
.expense-preview-form label { grid-column: 1 / -1; margin-bottom: 0; }
.expense-year-picker label { margin: 0 0 .55rem; }
.expense-year-picker select { min-width: 130px; }
.expense-total-badge { min-width: 125px; border: 1px solid #b8cde2; border-radius: 14px; background: #eef5fb; padding: .65rem .85rem; text-align: right; }
.expense-total-badge span, .expense-total-badge strong { display: block; }
.expense-total-badge span { color: var(--muted); font-size: .82rem; }
.expense-total-badge strong { margin-top: .12rem; color: var(--brand-dark); font-size: 1.6rem; }
.expense-overview-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.expense-employee-list { display: grid; gap: 1rem; }
.expense-employee-row { display: grid; grid-template-columns: minmax(210px, .65fr) minmax(0, 2.35fr); gap: 1rem; border: 1px solid var(--line); border-radius: 16px; padding: 1rem; background: #fff; }
.expense-employee-name { position: relative; min-width: 0; padding-right: 3rem; }
.expense-employee-name strong, .expense-employee-name span { display: block; }
.expense-employee-name strong { color: var(--ink); font-size: 1.05rem; }
.expense-employee-name span { margin-top: .18rem; color: var(--muted); font-size: .86rem; }
.expense-employee-name b { position: absolute; top: 0; right: 0; display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 999px; background: var(--brand); color: white; padding: 0 .45rem; }
.expense-month-grid { display: grid; grid-template-columns: repeat(5, minmax(95px, 1fr)); gap: .55rem; }
.expense-month-folder { display: grid; grid-template-columns: 1fr auto; gap: .1rem .4rem; min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #f7f9fc; padding: .65rem .7rem; color: var(--ink); text-decoration: none; }
.expense-month-folder:hover, .expense-month-folder:focus-visible { border-color: var(--brand); background: var(--accent); outline: 2px solid rgba(47,117,181,.14); }
.expense-month-folder.has-receipts { border-color: #89add1; background: #eef5fb; }
.expense-month-folder.has-unread { border-color: #e6a817; background: #fff9e9; box-shadow: inset 0 4px #e6a817; }
.expense-month-folder span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-month-folder strong { display: grid; place-items: center; min-width: 27px; height: 27px; border-radius: 999px; background: #dfe8f2; color: var(--brand-dark); }
.expense-month-folder.has-receipts strong { background: var(--brand); color: white; }
.expense-month-folder small { grid-column: 1 / -1; color: var(--muted); }
.expense-month-navigation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.expense-month-navigation > :last-child { justify-self: end; }
.expense-month-navigation strong { text-align: center; }
.expense-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.expense-summary-card { display: grid; align-content: start; gap: .18rem; min-width: 0; border: 1px solid var(--line); border-top: 5px solid #91a7bd; border-radius: 15px; background: #fff; padding: .85rem 1rem; }
.expense-summary-card.is-primary { border-top-color: #218b52; background: #f5fcf8; }
.expense-summary-card.is-over { border-top-color: #c83d3d; background: #fff7f7; }
.expense-summary-card span { color: var(--muted); font-size: .86rem; }
.expense-summary-card strong { overflow-wrap: anywhere; color: var(--ink); font-size: 1.35rem; }
.expense-summary-card small { color: var(--muted); }
.expense-summary-card a { color: var(--brand-dark); }
.expense-upload-card { margin-bottom: 1rem; }
.expense-upload-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; align-items: end; }
.expense-upload-form > div { min-width: 0; }
.expense-upload-form label, .expense-upload-form small { display: block; }
.expense-upload-form small { margin-top: .28rem; color: var(--muted); }
.expense-upload-form button { justify-self: start; }
.expense-form-step { position: relative; border: 1px solid #c9d7e5; border-radius: 13px; background: #f8fbfe; padding: .75rem; }
.expense-form-step > b:first-child { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-bottom: .42rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .82rem; }
.expense-form-step input[type="date"] { cursor: pointer; }
.document-cropper { grid-column: 1 / -1; width: 100%; border: 1px solid #8eb9a1; border-radius: 15px; background: #f4fbf7; padding: .85rem; }
.document-crop-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.document-crop-heading b, .document-crop-heading small { display: block; }
.document-crop-heading small { max-width: 760px; margin-top: .2rem; color: var(--muted); }
.document-crop-heading > span { flex: 0 0 auto; border-radius: 999px; background: #dff4e7; color: #176b3e; padding: .28rem .58rem; font-size: .76rem; font-weight: 800; }
.document-crop-stage { display: grid; place-items: center; overflow: hidden; border: 1px solid #aec0d2; border-radius: 13px; background: #162333; padding: .45rem; }
.document-crop-stage canvas { display: block; width: auto; max-width: 100%; max-height: 62vh; border-radius: 8px; cursor: move; touch-action: none; }
.document-crop-status { margin: .62rem 0 0; color: #176b3e; font-weight: 700; }
.document-crop-actions { margin-top: .62rem; }
.document-scan-editor { grid-column: 1 / -1; width: 100%; border: 1px solid #8eb9a1; border-radius: 15px; background: #f4fbf7; padding: .85rem; }
.document-scan-pages { display: flex; gap: .45rem; overflow-x: auto; margin: 0 0 .65rem; padding: .12rem 0 .35rem; scrollbar-width: thin; }
.document-scan-page { flex: 0 0 auto; border: 1px solid #a8bfd1; border-radius: 999px; background: #fff; color: var(--brand-dark); padding: .48rem .72rem; font-weight: 800; }
.document-scan-page.is-active { border-color: #1e7e4d; background: #dff4e7; color: #176b3e; box-shadow: 0 0 0 2px rgba(30, 126, 77, .13); }
.document-scan-actions { align-items: stretch; }
.document-live-scan-launcher { grid-column: 1 / -1; display: grid; justify-items: start; gap: .35rem; border: 1px dashed #69a985; border-radius: 14px; background: #f3fbf6; padding: .8rem; }
.document-live-scan-launcher small { color: var(--muted); }
.document-live-scan-dialog { width: min(760px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto; border: 0; border-radius: 18px; padding: 0; background: #f6fbf8; box-shadow: 0 24px 80px rgba(7, 27, 18, .35); }
.document-live-scan-dialog::backdrop { background: rgba(6, 19, 14, .76); backdrop-filter: blur(3px); }
.document-live-scan-shell { display: grid; gap: .75rem; padding: .9rem; }
.document-live-scan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.document-live-scan-heading h2 { margin: .05rem 0 0; }
.document-live-scan-heading > span { flex: 0 0 auto; border-radius: 999px; background: #dff4e7; color: #176b3e; padding: .32rem .62rem; font-weight: 850; }
.document-live-scan-preview { position: relative; width: 100%; aspect-ratio: var(--document-live-scan-ratio, 3 / 4); overflow: hidden; min-height: 0; border-radius: 15px; background: #06100c; transition: aspect-ratio .18s ease; }
.document-live-scan-preview video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.document-live-scan-guide { position: absolute; inset: 2.5%; border: 3px solid rgba(96, 224, 144, .9); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); pointer-events: none; }
.document-live-scan-status { margin: 0; color: #176b3e; font-weight: 750; }
.document-live-scan-actions { position: sticky; bottom: 0; padding-top: .25rem; background: #f6fbf8; }
.expense-filename-preview { grid-column: 1 / -1; border: 1px solid #8ab0d4; border-radius: 13px; background: #eef6fd; padding: .72rem .85rem; }
.expense-filename-preview span, .expense-filename-preview strong { display: block; }
.expense-filename-preview span { color: var(--muted); font-size: .8rem; }
.expense-filename-preview strong { margin-top: .12rem; overflow-wrap: anywhere; color: var(--brand-dark); }
.expense-camera-field input { padding: .7rem; border: 1px dashed #8eacca; border-radius: 12px; background: #f5f9fd; }
.expense-count-pill { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 999px; background: var(--brand); color: white; font-weight: 850; }
.expense-receipt-list { display: grid; gap: .75rem; }
.expense-receipt-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; padding: .85rem; background: #fff; }
.expense-receipt-item.is-unread { border-color: #e6a817; background: #fff9e9; box-shadow: inset 5px 0 #e6a817; }
.expense-receipt-file { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.expense-receipt-file > div { min-width: 0; }
.expense-receipt-file strong, .expense-receipt-file span, .expense-receipt-file small { display: block; }
.expense-receipt-file strong { overflow-wrap: anywhere; }
.expense-receipt-file span { margin-top: .16rem; color: var(--ink); }
.expense-receipt-file small { margin-top: .28rem; color: var(--muted); }
.expense-file-icon { flex: 0 0 auto; display: grid !important; place-items: center; width: 48px; height: 54px; border: 1px solid #9bb8d5; border-radius: 10px; background: #eef5fb; color: var(--brand-dark) !important; font-size: .72rem; font-weight: 900; }
.expense-receipt-item > .actions { flex: 0 0 auto; }
.expense-receipt-actions { align-items: center; justify-content: flex-end; max-width: 520px; }
.expense-rename-control { flex: 1 0 100%; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); }
.expense-rename-control > summary { padding: .62rem .75rem; color: var(--brand-dark); cursor: pointer; font-weight: 750; list-style-position: inside; }
.expense-rename-control form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: .5rem; border-top: 1px solid var(--line); padding: .75rem; }
.expense-rename-control label, .expense-rename-control small { grid-column: 1 / -1; }
.expense-rename-control label { margin: 0; }
.expense-rename-control small { color: var(--muted); }

@media (max-width: 1000px) {
  .expense-preview-launcher { grid-template-columns: 1fr; align-items: stretch; }
  .expense-preview-launcher > .button { justify-self: start; }
  .expense-employee-row { grid-template-columns: 1fr; }
  .expense-month-grid { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .expense-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .receipt-preview-banner { align-items: stretch; flex-direction: column; }
  .receipt-preview-banner .button { text-align: center; }
  .expense-preview-launcher > .button { justify-self: stretch; text-align: center; }
  .expense-preview-form { grid-template-columns: 1fr; }
  .expense-year-picker { width: 100%; }
  .expense-year-picker select { flex: 1; }
  .expense-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-month-navigation { grid-template-columns: 1fr 1fr; }
  .expense-month-navigation strong { grid-column: 1 / -1; grid-row: 1; }
  .expense-month-navigation > :first-child { grid-column: 1; }
  .expense-month-navigation > :last-child { grid-column: 2; }
  .expense-upload-form { grid-template-columns: 1fr; }
  .expense-summary-grid { grid-template-columns: 1fr 1fr; }
  .expense-summary-card { padding: .72rem .8rem; }
  .expense-summary-card strong { font-size: 1.12rem; }
  .expense-filename-preview { grid-column: auto; }
  .document-cropper, .document-scan-editor { grid-column: auto; margin: 0 -.2rem; }
  .document-crop-heading { flex-direction: column; }
  .document-crop-actions { display: grid; grid-template-columns: 1fr; }
  .document-crop-actions button { width: 100%; justify-content: center; }
  .expense-receipt-item { align-items: stretch; flex-direction: column; }
  .expense-receipt-item > .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .expense-receipt-item > .actions a { justify-content: center; text-align: center; }
  .expense-receipt-item > .actions form { grid-column: 1 / -1; }
  .expense-receipt-actions { max-width: none; }
  .expense-rename-control { grid-column: 1 / -1; }
  .expense-rename-control form { grid-template-columns: 1fr; }
}
.report-revision-panel { margin-top: 1.4rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.report-generation-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.report-generation-actions form { margin: 0; }
.report-source-selection-form { display: grid; gap: 1rem; }
.report-source-document-list { display: grid; max-height: 460px; gap: .55rem; overflow-y: auto; padding-right: .25rem; }
.report-source-document { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; margin: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: .8rem .9rem; cursor: pointer; }
.report-source-document:hover, .report-source-document:focus-within { border-color: var(--brand); background: var(--accent); }
.report-source-document.is-recommended { border-color: #91b9df; background: #f5faff; }
.report-source-document.is-core { border-color: #a9d6bd; background: #f3fbf6; cursor: default; }
.report-source-document.is-disabled { opacity: .68; cursor: default; }
.report-source-document input { width: auto; margin-top: .2rem; }
.report-source-document-copy { display: grid; min-width: 0; gap: .15rem; }
.report-source-document-copy strong, .report-source-document-copy small, .report-source-document-copy em { overflow-wrap: anywhere; }
.report-source-document-copy small { color: var(--muted); }
.report-source-document-copy em { color: var(--brand-dark); font-size: .82rem; font-style: normal; font-weight: 700; }
.report-full-editorial-form { margin: 1rem 0 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.report-full-editorial-form .help-text { margin: .55rem 0 0; }
.report-history-card { margin-top: 1rem; }
.report-version-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .65rem; }
.report-version-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.report-version-item:hover, .report-version-item:focus-within, .report-version-item.is-current { border-color: var(--brand); background: var(--accent); }
.report-version-link { display: grid; gap: .18rem; min-width: 0; padding: .8rem .9rem; color: var(--ink); text-decoration: none; background: transparent; }
.report-version-link span { color: var(--muted); font-size: .88rem; }
.report-version-delete-form { align-self: stretch; display: flex; align-items: center; padding: .55rem .75rem; border-left: 1px solid var(--line); }
.report-version-delete-form .link-button { white-space: nowrap; }
.report-revision-form { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(280px, 1.3fr); gap: .65rem 1rem; align-items: end; }
.report-revision-form label { align-self: end; }
.report-revision-form textarea, .report-revision-form .help-text { grid-column: 1 / -1; }
.report-revision-form button { justify-self: start; }
@media (max-width: 700px) {
  .report-revision-form { grid-template-columns: 1fr; }
  .report-revision-form textarea, .report-revision-form .help-text { grid-column: 1; }
}

@media (max-width: 640px) {
  .legal-page-heading { align-items: stretch; flex-direction: column; }
  .legal-page-heading .button { align-self: flex-start; }
  .legal-card, .legal-summary { border-radius: 14px; padding: 1.1rem; }
  .legal-card h2 { font-size: 1.2rem; }
  .legal-toc { align-items: flex-start; flex-direction: column; }
  .server-location-badge { align-items: flex-start; border-radius: 12px; }
  .legal-footer { margin-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

@media print {
  .topbar, .legal-footer, .legal-page-heading .button, .legal-toc { display: none !important; }
  .container, .legal-page { width: 100%; max-width: none; margin: 0; }
  .legal-card, .legal-summary { break-inside: avoid; border-color: #bbb; box-shadow: none; }
  .legal-table-wrap { overflow: visible; }
  .legal-table { min-width: 0; }
}
.billing-heading { align-items: flex-end; }
.billing-period-bar { display: flex; align-items: end; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.billing-period-bar form { display: flex; align-items: end; gap: .75rem; }
.billing-period-bar label { display: block; font-weight: 800; margin-bottom: .3rem; }
.billing-period-bar input { min-width: 12rem; }
.billing-revenue-overview { display: grid; grid-template-columns: minmax(16rem, 1.45fr) minmax(13rem, .75fr) minmax(18rem, 1fr); gap: 1rem; align-items: center; margin-bottom: 1rem; border-left: 5px solid #20a365; }
.billing-revenue-total { padding: .9rem 1rem; border-radius: 14px; background: #eaf8f0; }
.billing-revenue-total span, .billing-revenue-breakdown span, .billing-revenue-breakdown small { display: block; color: var(--muted); }
.billing-revenue-total strong { display: block; margin-top: .2rem; color: #176a46; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.billing-revenue-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.billing-revenue-breakdown > div { min-width: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.billing-revenue-breakdown strong { display: block; margin: .2rem 0; font-size: 1.15rem; }
.billing-revenue-warning { grid-column: 1 / -1; padding: .75rem .9rem; border: 1px solid #e5a71a; border-radius: 12px; background: #fff8e3; color: #73520b; }
.billing-overview-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.billing-overview-grid article { background: #fff; border: 1px solid var(--line); border-top: 4px solid #9caec4; border-radius: 18px; padding: 1rem; box-shadow: 0 12px 34px rgba(25, 50, 39, .06); }
.billing-overview-grid article.is-review { border-top-color: #2f75b5; }
.billing-overview-grid article.is-complete { border-top-color: #20a365; }
.billing-overview-grid article.is-open { border-top-color: #e5a71a; }
.billing-overview-grid span, .billing-overview-grid small { display: block; color: var(--muted); }
.billing-overview-grid strong { display: block; color: var(--ink); font-size: 1.45rem; margin: .3rem 0; }
.billing-employee-section, .billing-detail-section { margin-top: 1rem; }
.billing-detail-section { scroll-margin-top: 1rem; }
.billing-employee-list { display: grid; gap: .55rem; }
.billing-employee-row { display: grid; grid-template-columns: minmax(15rem, 2fr) repeat(4, minmax(6rem, .7fr)) auto; align-items: center; gap: .75rem; border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; color: var(--ink); text-decoration: none; background: #fff; }
.billing-employee-row:hover, .billing-employee-row.is-selected { border-color: var(--brand); background: #f2f8ff; box-shadow: 0 8px 24px rgba(20, 63, 120, .08); }
.billing-employee-row span:not(.billing-employee-name) { text-align: right; }
.billing-employee-row small, .billing-employee-name small { display: block; color: var(--muted); margin-top: .15rem; }
.billing-open-value strong { color: #a16600; }
.billing-person-summary { display: flex; flex-wrap: wrap; gap: .55rem; }
.billing-person-summary span { background: #edf4fb; border-radius: 999px; padding: .5rem .75rem; }
.billing-completeness { margin: 1rem 0 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: #f8fbfe; scroll-margin-top: 1rem; }
.billing-completeness-result { display: inline-block; border-radius: 12px; padding: .7rem .85rem; background: #edf1f5; color: var(--ink); font-weight: 850; text-align: center; }
.billing-completeness-result small { display: block; margin-top: .15rem; font-weight: 650; }
.billing-completeness-result.is-complete { background: #dff4e9; color: #08733f; }
.billing-completeness-result.is-explained { background: #e5f0ff; color: #174f91; }
.billing-completeness-result.is-open { background: #fff3cf; color: #815800; }
.billing-completeness-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .65rem; margin-top: .85rem; }
.billing-completeness-stats > div { border: 1px solid var(--line); border-radius: 12px; padding: .75rem; background: #fff; }
.billing-completeness-stats span { display: block; color: var(--muted); }
.billing-completeness-stats strong { display: block; margin-top: .2rem; font-size: 1.35rem; }
.billing-missing-list { margin-top: 1rem; }
.billing-missing-row { display: grid; grid-template-columns: minmax(13rem, .75fr) minmax(20rem, 1.5fr); gap: 1rem; align-items: start; border-top: 1px solid var(--line); padding: .9rem 0; }
.billing-missing-row.is-explained { border-left: 4px solid #2f75b5; padding-left: .75rem; }
.billing-missing-row small { display: block; color: var(--muted); margin-top: .25rem; }
.billing-missing-note-form { display: grid; gap: .4rem; }
.billing-missing-note-form label { font-weight: 800; }
.billing-missing-note-form textarea { min-height: 4.5rem; resize: vertical; }
.billing-missing-note-form .actions { margin-top: .1rem; }
.billing-all-complete { margin: 1rem 0 0; padding: .8rem; border-radius: 12px; background: #dff4e9; color: #08733f; font-weight: 800; }
.billing-detail-table td { vertical-align: top; }
.billing-detail-table td small { display: block; color: var(--muted); margin-top: .25rem; }
.billing-status { display: inline-flex; border-radius: 999px; font-weight: 800; padding: .35rem .6rem; line-height: 1.2; }
.billing-status-complete { background: #e2f6ec; color: #08733f; }
.billing-status-submitted { background: #e5f0ff; color: #174f91; }
.billing-status-draft { background: #fff3cf; color: #815800; }
.billing-warning { color: #9b5c00 !important; font-weight: 700; }
.billing-delivery { min-width: 14rem; }
.billing-delivery-form { display: grid; gap: .45rem; }
.billing-delivery-form .billing-status { justify-self: start; }
.billing-delivery-form button { width: 100%; }
.billing-actions { min-width: 13rem; }
.billing-actions .button { display: block; width: 100%; margin: 0 0 .4rem; text-align: center; }
.billing-empty-selection { margin-top: 1rem; text-align: center; }
@media (max-width: 1050px) {
  .billing-revenue-overview { grid-template-columns: 1fr 1fr; }
  .billing-revenue-overview > div:first-child { grid-column: 1 / -1; }
  .billing-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-employee-row { grid-template-columns: minmax(12rem, 2fr) repeat(2, minmax(5rem, 1fr)) auto; }
  .billing-employee-row > span:nth-child(4), .billing-employee-row > span:nth-child(5) { display: none; }
  .billing-completeness-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-missing-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .billing-revenue-overview { grid-template-columns: 1fr; }
  .billing-revenue-overview > div:first-child { grid-column: auto; }
  .billing-revenue-breakdown { grid-template-columns: 1fr; }
  .billing-period-bar, .billing-period-bar form { align-items: stretch; flex-wrap: wrap; }
  .billing-period-bar form { flex: 1 1 100%; }
  .billing-period-bar form > * { flex: 1 1 100%; }
  .billing-overview-grid { grid-template-columns: 1fr 1fr; }
  .billing-overview-grid article:last-child { grid-column: 1 / -1; }
  .billing-employee-row { grid-template-columns: 1fr auto; }
  .billing-employee-row > span:not(.billing-employee-name):not(:last-child) { display: none; }
}
@media (max-width: 900px) {
  .finance-stats, .finance-coverage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .finance-heading { align-items: stretch; flex-direction: column; }
  .finance-heading .button { align-self: flex-start; }
  .finance-filter-grid, .finance-stats, .finance-coverage-stats { grid-template-columns: 1fr; }
  .finance-cash-flow-note { grid-template-columns: 1fr; }
  .finance-cash-flow-arrow { transform: rotate(90deg); transform-origin: left center; }
  .finance-start-note { align-items: stretch; flex-direction: column; }
  .finance-coverage-result { align-items: flex-start; flex-direction: column; }
  .finance-warning summary { align-items: flex-start; flex-direction: column; }
  .finance-warning-list { grid-template-columns: 1fr; }
  .finance-filter-action button { width: 100%; }
}
.resource-booking-details {
  margin-top: .75rem;
  padding: .85rem;
  border: 1px solid #cbd9e6;
  border-radius: .85rem;
  background: #f7fafc;
}
.resource-booking-details > p:first-child { display: grid; gap: .2rem; margin: 0 0 .75rem; }
.resource-booking-prerequisite { display: block; margin: 0 0 .45rem; color: var(--muted); font-weight: 650; }
.resource-booking.is-waiting-for-appointment select { cursor: not-allowed; background: #edf2f6; color: #6f7f8f; }
.resource-access-options ul { display: grid; gap: .4rem; list-style: none; padding: 0; }
.resource-access-options li:first-child label { color: #a62c2c; font-weight: 700; }
.resource-access-options li:last-child label { color: #177447; font-weight: 700; }
.resource-availability { margin: .65rem 0 0; padding: .55rem .7rem; border-radius: .65rem; font-weight: 700; }
.resource-availability.is-available { color: #176b43; background: #e4f5ec; }
.resource-availability.is-unavailable { color: #9e2929; background: #fde8e7; }
.resource-availability.is-checking { color: #52677d; background: #eaf0f6; }
.appointment-series-extension-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #d8e2ec; }
.signature-notification-card { border-left: .35rem solid #c43636; }

/* Expense credits: visible, positive input with automatic negative accounting effect. */
.expense-kind-field ul { list-style: none; margin: .35rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.expense-kind-field li label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.expense-receipt-item.is-credit { border-color: #83c5a4; background: #f2fbf6; box-shadow: inset 5px 0 #2f8a5e; }
.expense-receipt-item.is-credit .expense-receipt-file b { color: #17653f; }

.expense-kind-field #id_kind { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin-top: .35rem; }
.expense-kind-field #id_kind > div label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }


/* Employee client overview: one self-contained card per case, without horizontal scrolling. */
.employee-case-list { display: grid; gap: .9rem; margin-top: .6rem; }
.employee-case-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(23, 42, 63, .06); }
.employee-case-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.05rem .9rem; }
.employee-case-identity { min-width: 0; }
.employee-case-kicker { display: block; margin-bottom: .18rem; color: var(--brand); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.employee-case-identity h3 { margin: 0; overflow-wrap: anywhere; font-size: 1.15rem; }
.employee-case-identity .case-new-document-note { display: block; margin-top: .25rem; }
.employee-case-identity .case-representation-badge { margin-top: .5rem; }
.employee-case-identity .representation-load-control { margin-top: .4rem; margin-bottom: 0; }
.employee-case-card-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.employee-case-card-actions .button { min-height: 38px; padding: .5rem .7rem; white-space: nowrap; }
.employee-case-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #f7fafc; }
.employee-case-detail { min-width: 0; padding: .8rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.employee-case-detail:nth-child(3n) { border-right: 0; }
.employee-case-detail:nth-last-child(-n + 3) { border-bottom: 0; }
.employee-case-detail > span:first-child { display: block; margin-bottom: .38rem; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.employee-case-detail > strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: .94rem; }
.employee-case-detail > small { display: block; margin-top: .25rem; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.employee-case-detail-important { background: #fff; }
.employee-case-detail .traffic-label { width: fit-content; max-width: 100%; white-space: normal; }
.employee-case-detail .traffic-label strong { overflow-wrap: anywhere; }
.employee-case-dates .case-date-edit { width: fit-content; max-width: 100%; flex-wrap: wrap; }

@media (max-width: 980px) {
  .employee-case-card-heading { flex-direction: column; }
  .employee-case-card-actions { justify-content: flex-start; width: 100%; }
  .employee-case-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-case-detail:nth-child(3n) { border-right: 1px solid var(--line); }
  .employee-case-detail:nth-child(2n) { border-right: 0; }
  .employee-case-detail:nth-last-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .employee-case-detail:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 620px) {
  .employee-case-card-heading { padding: .9rem; }
  .employee-case-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-case-card-actions .button { justify-content: center; text-align: center; white-space: normal; }
  .employee-case-detail-grid { grid-template-columns: 1fr; }
  .employee-case-detail, .employee-case-detail:nth-child(2n), .employee-case-detail:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .employee-case-detail:last-child { border-bottom: 0; }
}

/* NDC case workspace */
.ndc-progress-card .section-heading > strong { color: var(--brand); font-size: 1.35rem; }
.ndc-process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .55rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.ndc-process-steps li { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #f7fafc; }
.ndc-process-steps li span { display: grid; flex: 0 0 1.8rem; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; background: #e6edf4; color: var(--ink); font-size: .75rem; font-weight: 900; }
.ndc-process-steps li strong { overflow-wrap: anywhere; font-size: .76rem; line-height: 1.25; }
.ndc-process-steps li small { display: block; margin-top: .16rem; color: var(--muted); font-size: .62rem; line-height: 1.25; }
.ndc-process-steps li.is-done { border-color: #a6dac5; color: #176a4a; background: #f0faf6; }
.ndc-process-steps li.is-done span { background: #278d66; color: #fff; }
.ndc-process-steps li.is-current { border-color: #7db2dc; color: #174f7a; background: #eef7fd; box-shadow: 0 0 0 2px rgba(55, 126, 181, .08); }
.ndc-process-steps li.is-current span { color: #fff; background: var(--brand); }
.ndc-progress-hint { margin: .8rem 0 0; padding: .65rem .75rem; border-radius: 10px; color: #174f3d; background: #eef8f4; font-weight: 750; }
.ndc-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.ndc-action-grid > a, .ndc-action-grid > .ndc-action-disabled { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: .1rem .65rem; min-width: 0; padding: .85rem; border: 1px solid #cbdbea; border-radius: 14px; color: var(--ink); background: linear-gradient(135deg, #fff, #f3f8fc); text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.ndc-action-grid > a:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 9px 22px rgba(20, 73, 117, .1); }
.ndc-action-grid > a > span, .ndc-action-grid > .ndc-action-disabled > span { grid-row: 1 / 3; align-self: start; min-width: 3.1rem; padding: .3rem .4rem; border-radius: 999px; color: #176a4a; background: #e5f6ef; font-size: .64rem; font-weight: 900; text-align: center; }
.ndc-action-grid > .ndc-action-disabled { color: var(--muted); background: #f7f8fa; }
.ndc-action-grid > .ndc-action-disabled > span { color: #667483; background: #e9edf1; }
.ndc-action-grid strong { font-size: .92rem; }
.ndc-action-grid small { color: var(--muted); line-height: 1.35; }
.ndc-summary-grid, .ndc-decision-grid, .ndc-detail-grid, .ndc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.ndc-summary-grid > div, .ndc-decision-grid > div, .ndc-detail-grid > div { min-width: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.ndc-summary-grid span, .ndc-decision-grid span, .ndc-record-essence span { display: block; margin-bottom: .25rem; color: var(--brand); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.ndc-summary-grid p, .ndc-decision-grid p, .ndc-detail-grid p, .ndc-record-essence p { margin: .3rem 0 0; overflow-wrap: anywhere; line-height: 1.48; }
.ndc-recommendation-grid { grid-template-columns: minmax(0, 1fr); }
.ndc-detail-block { margin-top: .85rem; }
.ndc-detail-block > summary, .ndc-timeline-card > details > summary, .ndc-record-list details > summary { cursor: pointer; color: var(--brand); font-weight: 800; }
.ndc-detail-block[open] > summary, .ndc-timeline-card > details[open] > summary, .ndc-record-list details[open] > summary { margin-bottom: .75rem; }
.ndc-record-list { display: grid; gap: .75rem; }
.ndc-record-list > article { padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ndc-record-list article > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.ndc-record-list header span { display: block; margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.ndc-record-essence { padding: .75rem; border-left: 4px solid #2a8a68; border-radius: 8px; background: #f1faf6; }
.ndc-record-list details { margin-top: .65rem; }
.ndc-timeline { display: grid; gap: .85rem; }
.ndc-timeline > article { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .7rem; align-items: start; }
.ndc-timeline-marker { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: .76rem; font-weight: 900; box-shadow: 0 0 0 5px #e8f2f9; }
.ndc-timeline-card { min-width: 0; padding: .9rem; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 5px 15px rgba(22, 50, 78, .05); }
.ndc-timeline-card > header { display: flex; justify-content: space-between; gap: .75rem; }
.ndc-timeline-card h3 { margin: .12rem 0; font-size: 1.03rem; }
.ndc-entry-focus { margin: .65rem 0; padding: .7rem; border-radius: 10px; background: #f2f7fb; }
.ndc-entry-focus span { color: var(--muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.ndc-entry-focus p { margin: .25rem 0 0; }
.ndc-topic-pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0; }
.ndc-topic-pills span { padding: .25rem .5rem; border-radius: 999px; color: #155d45; background: #e6f5ef; font-size: .7rem; font-weight: 750; }
.ndc-timeline-card > footer { margin-top: .65rem; color: var(--muted); font-size: .69rem; }
.ndc-form { display: grid; gap: 1rem; }
.ndc-form .card { margin: 0; }
.ndc-form-grid > div { min-width: 0; }
.ndc-form-grid > .full-width { grid-column: 1 / -1; }
.ndc-form-grid label:not(:has(input)) { display: block; margin-bottom: .32rem; font-weight: 800; }
.ndc-form-grid input[type="text"], .ndc-form-grid input[type="date"], .ndc-form-grid select, .ndc-form-grid textarea { width: 100%; }
.ndc-checkbox-list > div, .ndc-choice-row > div, .ndc-choice-row > ul { display: flex; flex-wrap: wrap; gap: .45rem; margin: .35rem 0 0; padding: 0; list-style: none; }
.ndc-checkbox-list label, .ndc-choice-row label { display: flex; align-items: flex-start; gap: .4rem; padding: .48rem .62rem; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; font-weight: 700; }
.ndc-checkbox-list input, .ndc-choice-row input { margin-top: .15rem; }
.ndc-topic-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.ndc-topic-groups fieldset { min-width: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 13px; }
.ndc-topic-groups legend { padding: 0 .3rem; color: var(--brand); font-weight: 850; }
.ndc-topic-option + .ndc-topic-option { margin-top: .55rem; }
.ndc-topic-option > label { display: flex; align-items: center; gap: .42rem; font-weight: 750; }
.ndc-topic-option > div { margin: .35rem 0 0 1.45rem; }
.ndc-topic-option textarea { width: 100%; }
.ndc-assessment-person { margin: 0 0 1rem; padding: .85rem; border: 1px solid #b9d8ce; border-radius: 13px; background: #f1faf7; }
.ndc-assessment-person > label { display: block; margin-bottom: .35rem; font-weight: 850; }
.ndc-assessment-person > input { width: 100%; }
.ndc-assessment-person .helptext { display: block; margin-top: .4rem; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.ndc-topic-entry { padding: .65rem; border-left: 3px solid #9ccfbd; border-radius: 8px; background: #f7fbfa; }
.ndc-topic-entry > label { display: block; margin: .65rem 0 .3rem; font-size: .76rem; font-weight: 800; }
.ndc-burden-field > strong { display: block; margin-bottom: .22rem; font-size: .76rem; }
.ndc-burden-legend { display: flex; justify-content: space-between; margin-bottom: .35rem; color: var(--muted); font-size: .65rem; font-weight: 750; }
.ndc-burden-field > div { display: grid; grid-template-columns: repeat(11, minmax(30px, 1fr)); gap: .25rem; }
.ndc-burden-field > div > div { min-width: 0; }
.ndc-burden-field label { display: grid; min-height: 2rem; place-items: center; border: 1px solid rgba(20, 48, 63, .13); border-radius: 8px; color: #173042; background: #e7f4ea; font-size: .72rem; font-weight: 900; cursor: pointer; }
.ndc-burden-field label:has(input:checked) { outline: 3px solid #173f62; outline-offset: 1px; color: #0d2232; box-shadow: 0 4px 10px rgba(18, 46, 68, .18); }
.ndc-burden-field label input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ndc-burden-field > div > div:nth-child(1) label { background: #dff4e5; }
.ndc-burden-field > div > div:nth-child(2) label { background: #e7f2d7; }
.ndc-burden-field > div > div:nth-child(3) label { background: #edf0c9; }
.ndc-burden-field > div > div:nth-child(4) label { background: #f3edbb; }
.ndc-burden-field > div > div:nth-child(5) label { background: #f8e8ac; }
.ndc-burden-field > div > div:nth-child(6) label { background: #f9df9f; }
.ndc-burden-field > div > div:nth-child(7) label { background: #f8d292; }
.ndc-burden-field > div > div:nth-child(8) label { background: #f5c086; }
.ndc-burden-field > div > div:nth-child(9) label { background: #f0aa7d; }
.ndc-burden-field > div > div:nth-child(10) label { background: #e99176; }
.ndc-burden-field > div > div:nth-child(11) label { background: #df7770; }
.ndc-burden-filter { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-bottom: .9rem; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: #f7fafc; }
.ndc-burden-filter > div { flex: 1 1 230px; }
.ndc-burden-filter label, .ndc-burden-filter summary { font-size: .76rem; font-weight: 800; }
.ndc-burden-filter select { width: 100%; margin-top: .3rem; }
.ndc-burden-filter details { position: relative; flex: 1 1 230px; }
.ndc-burden-filter details > summary { padding: .58rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.ndc-burden-topic-filter { display: grid; gap: .3rem; max-height: 230px; margin-top: .35rem; overflow: auto; padding: .55rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ndc-burden-topic-filter label { display: flex; align-items: flex-start; gap: .35rem; font-weight: 650; }
.ndc-burden-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.ndc-burden-summary > div { padding: .75rem; border: 1px solid #c6ddd5; border-radius: 12px; background: #f2faf7; }
.ndc-burden-summary span { display: block; color: var(--muted); font-size: .69rem; font-weight: 800; text-transform: uppercase; }
.ndc-burden-summary strong { display: block; margin-top: .15rem; color: #185f48; font-size: 1.28rem; }
.ndc-burden-summary-text { margin: .75rem 0; padding: .7rem .8rem; border-left: 4px solid #2b8b69; border-radius: 8px; background: #eff9f5; font-weight: 780; }
.ndc-burden-chart { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .35rem .55rem; margin: .85rem 0 1rem; padding: .65rem; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(to bottom, rgba(225, 103, 92, .1), rgba(246, 204, 111, .08) 50%, rgba(54, 158, 110, .1)); }
.ndc-chart-axis { display: flex; flex-direction: column; justify-content: space-between; min-height: 210px; color: var(--muted); font-size: .65rem; font-weight: 750; }
.ndc-burden-chart svg { width: 100%; height: 210px; overflow: visible; }
.ndc-burden-chart line { stroke: #cbd8e2; stroke-width: .45; vector-effect: non-scaling-stroke; }
.ndc-burden-chart polyline { fill: none; stroke: #216d91; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ndc-burden-chart circle { fill: hsl(var(--score-hue) 67% 42%); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ndc-chart-labels { grid-column: 2; display: flex; justify-content: space-around; gap: .35rem; }
.ndc-chart-labels span { display: grid; text-align: center; }
.ndc-chart-labels strong { font-size: .76rem; }
.ndc-chart-labels small { color: var(--muted); font-size: .62rem; }
.ndc-burden-series { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.ndc-burden-series article { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-width: 0; padding: .7rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.ndc-burden-series article > div:first-child { min-width: 0; }
.ndc-burden-series article > div:first-child span, .ndc-burden-series article > div:first-child small { display: block; color: var(--muted); font-size: .67rem; }
.ndc-burden-series article strong { display: block; margin: .12rem 0; overflow-wrap: anywhere; font-size: .82rem; }
.ndc-burden-change { display: grid; grid-template-columns: auto auto auto; align-items: center; gap: .3rem; flex: 0 0 auto; text-align: center; }
.ndc-burden-change > span { font-weight: 850; }
.ndc-burden-change > small { grid-column: 1 / -1; color: var(--muted); font-size: .6rem; }
.ndc-score-chip { display: inline-grid; min-width: 2.4rem; min-height: 2rem; place-items: center; padding: .2rem .35rem; border-radius: 8px; color: #112d28; background: hsl(var(--score-hue) 66% 78%); font-weight: 900; }
.ndc-burden-table-wrap { overflow-x: auto; }
.ndc-burden-table { min-width: 100%; border-collapse: collapse; font-size: .75rem; }
.ndc-burden-table th, .ndc-burden-table td { padding: .55rem; border: 1px solid var(--line); text-align: center; }
.ndc-burden-table th:first-child { position: sticky; left: 0; z-index: 1; background: #f7fafc; text-align: left; }
.ndc-assessment-source { margin: .25rem 0 .6rem; color: var(--muted); font-size: .72rem; }
.ndc-auto-evaluation { display: grid; gap: .22rem; margin-bottom: .75rem; padding: .8rem; border-left: 4px solid #2c8c69; border-radius: 9px; background: #f0faf6; }
.ndc-auto-evaluation > span { color: #1a6b4e; font-size: .67rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.ndc-auto-evaluation > small { color: var(--muted); }
.ndc-sticky-actions { position: sticky; bottom: .7rem; z-index: 8; padding: .7rem; border: 1px solid #c9d9e6; border-radius: 13px; background: rgba(255, 255, 255, .95); box-shadow: 0 8px 25px rgba(17, 45, 70, .13); backdrop-filter: blur(7px); }
[data-ndc-module][hidden], [data-ndc-site-only][hidden], [data-ndc-appointment-only][hidden], [data-ndc-topic-note][hidden], [data-ndc-parent-meeting][hidden], [data-ndc-parent-advice][hidden] { display: none !important; }

/* Direct entry of one shared appointment for several cases. */
.calendar-entry-mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: .75rem 0 .45rem; padding: .3rem; border-radius: 13px; background: #edf3f7; }
.calendar-entry-mode-switch button { min-height: 42px; padding: .55rem .65rem; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; font: inherit; font-size: .78rem; font-weight: 850; cursor: pointer; }
.calendar-entry-mode-switch button.is-active { border-color: #a9d8c7; color: #17684a; background: #fff; box-shadow: 0 5px 13px rgba(21, 73, 55, .09); }
.calendar-joint-mode-hint { margin: .25rem 0 .8rem; padding: .65rem .75rem; border-left: 4px solid #2c8f69; border-radius: 8px; color: #245541; background: #eef9f5; font-size: .76rem; line-height: 1.4; }
.calendar-joint-clients-field { min-width: 0; }
.calendar-joint-client-search { width: 100%; margin: .35rem 0 .45rem; }
.calendar-joint-client-options { max-height: 250px; overflow: auto; padding: .35rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.calendar-joint-client-options > div + div { margin-top: .2rem; }
.calendar-joint-client-options label { display: flex; align-items: center; gap: .45rem; padding: .42rem .5rem; border-radius: 8px; cursor: pointer; }
.calendar-joint-client-options label:hover { background: #eaf5f1; }
.calendar-joint-client-count { display: block; margin-top: .4rem; color: #17684a; font-weight: 800; }
.joint-confirmation-clients { display: block; margin-top: .25rem; color: var(--muted); font-weight: 700; line-height: 1.4; }
.joint-confirmation-attendance { margin: 0; padding: .75rem .8rem; border: 1px solid #a9d8c7; border-radius: 12px; background: #f2faf7; }
.joint-confirmation-attendance legend { padding: 0 .25rem; color: #17684a; font-weight: 850; }
.joint-confirmation-attendance > p { margin: 0 0 .55rem; color: var(--muted); font-size: .78rem; }
.joint-confirmation-attendance > small { display: block; margin-top: .5rem; color: var(--muted); }
.joint-confirmation-attendee-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.joint-confirmation-attendee-list label { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .5rem .6rem; border: 1px solid #cce6dc; border-radius: 9px; background: #fff; cursor: pointer; }
.joint-confirmation-attendee-list input { width: auto; margin: 0; }
.joint-confirmation-attendee-list span { overflow-wrap: anywhere; font-weight: 750; }

@media (max-width: 620px) {
  .calendar-entry-mode-switch { grid-template-columns: 1fr; }
  .joint-confirmation-attendee-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ndc-process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ndc-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ndc-process-steps, .ndc-action-grid, .ndc-summary-grid, .ndc-decision-grid, .ndc-detail-grid, .ndc-form-grid, .ndc-topic-groups { grid-template-columns: 1fr; }
  .ndc-form-grid > .full-width { grid-column: auto; }
  .ndc-timeline > article { grid-template-columns: 1.8rem minmax(0, 1fr); gap: .45rem; }
  .ndc-timeline-marker { width: 1.75rem; height: 1.75rem; }
  .ndc-timeline-card > header, .ndc-record-list article > header { flex-direction: column; }
  .ndc-burden-field > div { grid-template-columns: repeat(6, minmax(30px, 1fr)); }
  .ndc-burden-summary, .ndc-burden-series { grid-template-columns: 1fr; }
  .ndc-burden-chart { grid-template-columns: 4.4rem minmax(0, 1fr); }
}

/* Digital start folder */
.start-folder-form {
  display: grid;
  gap: 1rem;
}

.start-folder-heading {
  align-items: flex-start;
}

.start-folder-status-card,
.start-folder-link-card .section-heading,
.start-folder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.start-folder-status-card {
  border-left: 0.45rem solid #9aaabd;
}

.start-folder-status-card.status-in_progress,
.start-folder-status-panel.status-in_progress {
  border-color: #d59a25;
}

.start-folder-status-card.status-submitted,
.start-folder-status-panel.status-submitted {
  border-color: #269365;
}

.start-folder-status-badge {
  flex: 0 0 auto;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #edf3f8;
  color: #17314d;
  font-weight: 800;
}

.status-submitted .start-folder-status-badge {
  background: #e5f5ed;
  color: #176443;
}

.start-folder-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.start-folder-copy-row input {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.start-folder-section {
  scroll-margin-top: 1rem;
}

.start-folder-section > h2,
.start-folder-section > .eyebrow {
  margin-bottom: 0.65rem;
}

.start-folder-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.start-folder-field-grid .full-width {
  grid-column: 1 / -1;
}

.start-folder-reading {
  display: grid;
  gap: 0.75rem;
}

.start-folder-reading details,
.start-folder-question-group {
  border: 1px solid #d8e2eb;
  border-radius: 0.8rem;
  background: #f8fafc;
  overflow: hidden;
}

.start-folder-reading summary,
.start-folder-question-group > summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  color: #17314d;
  font-weight: 800;
}

.start-folder-reading details > p {
  margin: 0;
  padding: 0 1rem 0.9rem;
}

.start-folder-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 0.8rem;
  background: #edf6f2;
  font-weight: 700;
}

.start-folder-confirmation input {
  width: auto;
  margin-top: 0.2rem;
}

.start-folder-choice-block {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #d8e2eb;
  border-radius: 0.8rem;
}

.start-folder-choice-block ul,
.start-folder-question-field.choice-field ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.start-folder-choice-block label,
.start-folder-question-field.choice-field label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
}

.start-folder-choice-block input,
.start-folder-question-field.choice-field input {
  width: auto;
  margin-top: 0.2rem;
}

.start-folder-questionnaire {
  display: grid;
  gap: 0.85rem;
}

.start-folder-question-fields {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
}

.start-folder-question-field {
  display: grid;
  gap: 0.45rem;
}

.start-folder-question-field textarea {
  min-height: 7rem;
}

.start-folder-signature {
  margin-top: 1rem;
}

.start-folder-fitness-details,
.start-folder-fitness-signing {
  margin-top: 1rem;
}

.start-folder-fitness-details[hidden],
.start-folder-fitness-health-details[hidden] {
  display: none !important;
}

.start-folder-fitness-health-details {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.start-folder-fitness-rules {
  margin-top: 1rem;
  border: 1px solid #cfe0d8;
  border-radius: 0.8rem;
  background: #f7fbf9;
  overflow: hidden;
}

.start-folder-fitness-rules summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  color: #17314d;
  font-weight: 800;
}

.start-folder-fitness-rules ol {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0 1.2rem 1rem 2.8rem;
}

.start-folder-fitness-rules li::marker {
  color: #1e7a58;
  font-weight: 800;
}

.start-folder-privacy-notice {
  padding: 1rem;
  border: 1px solid #d8e2eb;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.start-folder-privacy-notice p {
  margin: 0;
}

.confidentiality-release-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.confidentiality-release {
  padding: 1rem;
  border: 1px solid #cbdbe6;
  border-left: 0.35rem solid #2b8a67;
  border-radius: 0.9rem;
  background: #f8fbfa;
}

.confidentiality-release[hidden] {
  display: none !important;
}

.confidentiality-release > header,
.confidentiality-release-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.confidentiality-release > header {
  margin-bottom: 1rem;
}

.confidentiality-release > header h3,
.confidentiality-release > header p {
  margin-bottom: 0;
}

.confidentiality-release-actions {
  margin-top: 0.8rem;
}

.start-folder-actions {
  position: sticky;
  bottom: 0.75rem;
  z-index: 8;
  box-shadow: 0 0.65rem 1.8rem rgba(17, 43, 68, 0.16);
}

.start-folder-finished {
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
}

.start-folder-finished .actions {
  justify-content: center;
}

.start-folder-change-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.start-folder-change-actions form {
  margin: 0;
}

.start-folder-locked-notice {
  border-left: 0.4rem solid #269365;
}

.start-folder-readonly fieldset {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 1rem;
}

.start-folder-readonly :is(input, textarea, select):disabled {
  color: #24384d;
  -webkit-text-fill-color: #24384d;
  opacity: 1;
  background: #f4f7f9;
}

.start-folder-readonly .signature-canvas {
  pointer-events: none;
}

.start-folder-revisions {
  margin-top: 1rem;
}

.start-folder-revision-list {
  display: grid;
  gap: 0.7rem;
}

.start-folder-revision-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid #d8e2eb;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.start-folder-revision-list article > div {
  display: grid;
  gap: 0.15rem;
}

.start-folder-revision-list article span {
  color: #607086;
}

@media (max-width: 760px) {
  .start-folder-field-grid,
  .start-folder-copy-row {
    grid-template-columns: 1fr;
  }

  .start-folder-status-card,
  .start-folder-link-card .section-heading,
  .start-folder-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .start-folder-actions button,
  .start-folder-link-card form,
  .start-folder-link-card button {
    width: 100%;
  }

  .confidentiality-release > header,
  .confidentiality-release-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .confidentiality-release-actions .button,
  .confidentiality-release > header button {
    width: 100%;
  }

  .start-folder-change-actions,
  .start-folder-change-actions form,
  .start-folder-change-actions button,
  .start-folder-revision-list article,
  .start-folder-revision-list .button {
    width: 100%;
  }

  .start-folder-revision-list article {
    grid-template-columns: 1fr;
  }
}

@media print {
  .topbar,
  .assistant-launcher,
  .start-folder-actions,
  .start-folder-link-card,
  .page-heading .actions,
  .signature-clear,
  [data-confidentiality-release-add],
  .confidentiality-release-remove,
  .confidentiality-release-actions,
  .messages {
    display: none !important;
  }

  body,
  main,
  .card,
  .start-folder-question-fields {
    background: #fff !important;
    box-shadow: none !important;
  }

  .start-folder-form,
  .start-folder-questionnaire {
    display: block;
  }

  .start-folder-section,
  .start-folder-question-group {
    break-inside: avoid;
    margin-bottom: 8mm;
  }
}

/* Kollegiale Fallberatung */
.peer-consultation-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.peer-consultation-list {
  display: grid;
  gap: .75rem;
}

.peer-consultation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #dbe9e4;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.peer-consultation-row:hover {
  border-color: #7fc3a5;
  box-shadow: 0 10px 24px rgba(24, 72, 54, .1);
  transform: translateY(-1px);
}

.peer-consultation-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #e8f6ef;
  color: #166b48;
  font-size: .8rem;
  font-weight: 800;
}

.peer-consultation-state.is-closed {
  background: #edf1f5;
  color: #617083;
}

.peer-consultation-row-main,
.peer-consultation-row-main small {
  display: block;
}

.peer-consultation-row-main strong {
  display: block;
  margin-bottom: .25rem;
  color: #132d45;
  font-size: 1.04rem;
}

.peer-consultation-row-main small,
.peer-consultation-row-meta {
  color: #68798b;
}

.peer-consultation-row-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}

.peer-consultation-form {
  display: grid;
  gap: 2rem;
  max-width: 1100px;
}

.peer-consultation-form section,
.peer-consultation-depth > div {
  display: grid;
  gap: 1rem;
}

.peer-consultation-form label,
.peer-consultation-contribution-form label,
.peer-consultation-close-card label {
  display: grid;
  gap: .38rem;
  color: #20364c;
  font-weight: 750;
}

.peer-consultation-form label small {
  color: #738194;
  font-weight: 500;
}

.peer-consultation-depth {
  border: 1px solid #d8e6e1;
  border-radius: 16px;
  background: #f7fbf9;
  overflow: hidden;
}

.peer-consultation-depth > summary,
.peer-consultation-close-card > summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
}

.peer-consultation-depth > summary span,
.peer-consultation-depth > summary small {
  display: block;
}

.peer-consultation-depth > div {
  padding: 0 1.15rem 1.15rem;
}

.peer-consultation-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}

.peer-consultation-facts > div,
.peer-consultation-answer-grid > div {
  padding: 1rem;
  border-radius: 14px;
  background: #f6faf9;
}

.peer-consultation-facts span,
.peer-consultation-answer-grid span {
  display: block;
  margin-bottom: .28rem;
  color: #738194;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.peer-consultation-facts strong,
.peer-consultation-facts small {
  display: block;
}

.peer-consultation-scope-note {
  margin: 1rem 0 0;
  color: #607286;
  font-size: .9rem;
}

.peer-consultation-question-card {
  border-left: 5px solid #278d63;
}

.peer-consultation-question-card h2 {
  max-width: 900px;
  line-height: 1.3;
}

.peer-consultation-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.peer-consultation-answer-grid p {
  margin: 0;
  line-height: 1.55;
}

.peer-consultation-timeline {
  display: grid;
  gap: 0;
  margin: .5rem 0 1.5rem;
}

.peer-consultation-timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: .8rem;
  padding-bottom: 1.2rem;
}

.peer-consultation-timeline article:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 0;
  left: 7px;
  width: 2px;
  background: #cfe3da;
}

.peer-consultation-timeline-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: .25rem;
  border: 4px solid #dff2e9;
  border-radius: 50%;
  background: #278d63;
}

.peer-consultation-contribution-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
}

.peer-consultation-contribution-meta span {
  color: #738194;
  font-size: .86rem;
}

.peer-consultation-contribution-form,
.peer-consultation-close-card form {
  display: grid;
  gap: .85rem;
  padding-top: 1rem;
  border-top: 1px solid #e1ebe7;
}

.peer-consultation-result-card {
  border: 1px solid #9bd1b7;
  background: #f7fcf9;
}

.peer-consultation-chat-panel {
  width: min(720px, 94%);
  margin: 0 auto 1rem;
  padding: .9rem;
  border: 1px solid #b8dccc;
  border-radius: 16px;
  background: rgba(248, 253, 250, .97);
  box-shadow: 0 8px 22px rgba(24, 72, 54, .08);
}

.peer-consultation-chat-heading,
.peer-consultation-chat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.peer-consultation-chat-heading strong,
.peer-consultation-chat-heading span,
.peer-consultation-chat-list strong,
.peer-consultation-chat-list small {
  display: block;
}

.peer-consultation-chat-list {
  display: grid;
  gap: .45rem;
  margin-top: .7rem;
}

.peer-consultation-chat-list a {
  padding: .65rem .75rem;
  border-radius: 11px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.peer-consultation-chat-list a:hover {
  background: #eaf7f0;
}

.peer-consultation-chat-list small,
.peer-consultation-chat-meta {
  color: #697a8b;
  font-size: .8rem;
}

.peer-consultation-chat-meta {
  display: flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .peer-consultation-summary-grid,
  .peer-consultation-facts,
  .peer-consultation-answer-grid {
    grid-template-columns: 1fr;
  }

  .peer-consultation-row {
    grid-template-columns: 1fr;
  }

  .peer-consultation-row-meta {
    justify-content: space-between;
  }

  .peer-consultation-chat-panel {
    width: 100%;
  }
}
