:root {
    --crm-ink: #172033;
    --crm-muted: #667085;
    --crm-line: #d9dee8;
    --crm-soft-line: #e8ecf3;
    --crm-bg: #f3f5f8;
    --crm-panel: #ffffff;
    --crm-sidebar: #192233;
    --crm-sidebar-2: #202c42;
    --crm-accent: #b08d57;
    --crm-accent-dark: #8f7040;
    --crm-blue: #385f9f;
    --crm-blue-dark: #2d4d80;
    --crm-danger: #b42318;
    --crm-success: #027a48;
    --crm-radius: 8px;
    --crm-shadow: 0 12px 30px rgba(23, 32, 51, .08);
}

/* Agenda workspace */
.agenda-page { display: grid; gap: 1.25rem; }
.reminder-row .reminder-amount { width: 110px; flex: 0 0 110px; }
.reminder-row .reminder-unit { width: 160px; flex: 0 0 160px; }
.participant-selected-list { display: flex; flex-wrap: wrap; gap: .6rem; min-height: 46px; padding: .75rem; border: 1px solid #e1e5ec; border-radius: 10px; background: #fafbfc; }
.participant-chip { display: flex; align-items: center; gap: .65rem; padding: .48rem .55rem .48rem .75rem; border: 1px solid #dce3ef; border-radius: 9px; background: #fff; }
.participant-chip span { display: grid; line-height: 1.2; }.participant-chip small { color: #7d8797; font-size: .72rem; }.participant-chip button, .participant-dialog-head > button { border: 0; background: transparent; color: #a33; font-size: 1.25rem; }
.participant-dialog { width: min(680px, calc(100vw - 2rem)); max-height: min(720px, calc(100vh - 2rem)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 70px rgba(20, 30, 50, .25); }
.participant-dialog::backdrop { background: rgba(20, 28, 45, .55); }.participant-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid #e8ebf0; }.participant-dialog-head h2 { margin: 0; font-size: 1.1rem; }
.participant-dialog > .form-control { margin: 1rem; width: calc(100% - 2rem); }.participant-dialog-list { max-height: 520px; overflow-y: auto; padding: 0 1rem 1rem; }
.participant-result { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #edf0f4; }.participant-result > div { min-width: 0; }.participant-result strong, .participant-result small { display: block; }.participant-result small { margin-top: .15rem; color: #7d8797; font-size: .78rem; }
@media (max-width: 575px) { .reminder-row { flex-wrap: wrap; } .reminder-row .reminder-amount, .reminder-row .reminder-unit { width: auto; flex: 1 1 120px; } }
.agenda-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.agenda-page-header h1 { margin: .1rem 0 .25rem; font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -.04em; }
.agenda-page-header p:not(.page-eyebrow) { margin: 0; color: var(--text-muted, #667085); }
.agenda-header-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.agenda-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1.25rem; align-items: start; }
.agenda-main { min-width: 0; }
.agenda-calendar-card,
.agenda-side-card { background: #fff; border: 1px solid #e6e9f0; border-radius: 18px; box-shadow: 0 12px 32px rgba(26, 39, 74, .06); }
.agenda-calendar-card { overflow: hidden; transition: opacity .18s ease; }
.agenda-calendar-card.is-loading { opacity: .55; pointer-events: none; }
.agenda-calendar-toolbar { min-height: 76px; padding: 1rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #edf0f5; }
.agenda-period-nav, .agenda-toolbar-actions { display: flex; align-items: center; gap: .75rem; }
.agenda-period-title { min-width: 190px; text-align: center; display: grid; line-height: 1.2; }
.agenda-period-title strong { font-size: 1.05rem; text-transform: capitalize; }
.agenda-period-title span { margin-top: .18rem; font-size: .75rem; color: #8a94a6; }
.agenda-nav-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid #e1e5ec; color: #344054; text-decoration: none; font-size: 1.5rem; line-height: 1; }
.agenda-nav-button:hover { background: #f3f6fb; color: var(--crm-blue, #385f9f); }
.agenda-view-switch { display: inline-flex; padding: 3px; border: 1px solid #e1e5ec; background: #f7f8fb; border-radius: 10px; }
.agenda-view-switch a { padding: .38rem .72rem; border-radius: 7px; color: #667085; text-decoration: none; font-size: .82rem; font-weight: 700; }
.agenda-view-switch a.is-active { color: #fff; background: var(--crm-blue, #385f9f); box-shadow: 0 3px 8px rgba(56, 95, 159, .22); }
.agenda-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); background: #e6e9ef; gap: 1px; min-width: 860px; }
.agenda-weekday { padding: .72rem .5rem; text-align: center; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #7d8797; background: #f8f9fb; }
.agenda-calendar-day { position: relative; min-width: 0; min-height: 142px; padding: .55rem; background: #fff; }
.agenda-calendar-grid--week .agenda-calendar-day { min-height: 610px; padding: .75rem; }
.agenda-calendar-day.is-outside { background: #f6f7f9; color: #a6adba; }
.agenda-calendar-day.is-today { background: #f3f7ff; box-shadow: inset 0 0 0 2px rgba(49, 84, 216, .42); }
.agenda-day-heading { min-height: 29px; display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; }
.agenda-day-heading > div { display: flex; align-items: baseline; gap: .35rem; min-width: 0; }
.agenda-day-number { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; font-size: .82rem; font-weight: 800; }
.is-today .agenda-day-number { color: #fff; background: var(--crm-blue, #385f9f); }
.agenda-day-name { display: none; color: #697386; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.agenda-calendar-grid--week .agenda-day-name { display: inline; }
.agenda-day-jewish { color: #98a1b2; font-size: .68rem; }
.agenda-day-add { opacity: 0; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 8px; background: #e9efff; color: var(--crm-blue, #385f9f); font-weight: 800; transition: opacity .15s ease, transform .15s ease; }
.agenda-calendar-day:hover .agenda-day-add, .agenda-day-add:focus-visible { opacity: 1; }
.agenda-day-add:hover { transform: scale(1.06); }
.agenda-day-items { display: grid; gap: .28rem; margin-top: .28rem; }
.agenda-calendar-item { --agenda-item-color: #3154d8; --agenda-item-text: #17317e; display: block; min-width: 0; padding: .32rem .42rem; border-inline-start: 3px solid var(--agenda-item-color); border-radius: 5px; background: color-mix(in srgb, var(--agenda-item-color) 12%, white); color: var(--agenda-item-text); text-decoration: none; font-size: .72rem; line-height: 1.25; overflow: hidden; }
.agenda-calendar-item time { margin-inline-end: .25rem; font-weight: 800; }
.agenda-calendar-item > span { font-weight: 700; }
.agenda-calendar-item small { display: block; margin-top: .18rem; opacity: .72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-calendar-item:hover { filter: brightness(.97); color: var(--agenda-item-text); }
.agenda-calendar-item--task { --agenda-item-color: #e5a112; --agenda-item-text: #795100; }
.agenda-calendar-item--personal-task { --agenda-item-color: #8b5cf6; --agenda-item-text: #5b21b6; }
.agenda-calendar-item--deadline { --agenda-item-color: #df4c5b; --agenda-item-text: #8a2330; }
.agenda-calendar-item--personal { --agenda-item-color: #10a981; --agenda-item-text: #09664f; }
.agenda-calendar-item--holiday { --agenda-item-color: #d6a934; --agenda-item-text: #6f5200; cursor: default; }
.agenda-calendar-item--shabbat { --agenda-item-color: #3154d8; --agenda-item-text: #17317e; cursor: default; }
.agenda-calendar-grid--month .is-month-overflow { display: none; }
.agenda-more-items { padding-inline: .35rem; color: #667085; font-size: .69rem; font-weight: 700; }
.agenda-context { display: grid; gap: 1rem; }
.agenda-side-card { padding: 1rem; }
.agenda-side-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .75rem; }
.agenda-side-card h2 { margin: 0; font-size: .95rem; }
.agenda-side-heading > span { color: #98a1b2; font-size: .7rem; }
.agenda-filter { display: flex; align-items: center; gap: .55rem; padding: .44rem 0; color: #475467; font-size: .83rem; cursor: pointer; }
.agenda-filter input { width: 16px; height: 16px; accent-color: var(--crm-blue, #385f9f); }
.agenda-filter-dot, .agenda-upcoming-marker { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #3154d8; }
.agenda-filter-dot.is-task { background: #e5a112; }
.agenda-filter-dot.is-personal-task { background: #8b5cf6; }
.agenda-filter-dot.is-deadline { background: #df4c5b; }
.agenda-filter-dot.is-personal, .agenda-upcoming-marker.is-personal { background: #10a981; }
.agenda-filter-dot.is-holiday { background: #d6a934; }
.agenda-google-card { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: center; }
.agenda-google-card .btn { grid-column: 1 / -1; }
.agenda-google-card p { margin: .2rem 0 0; color: #7d8797; font-size: .75rem; line-height: 1.35; }
.agenda-google-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #e1e5ec; border-radius: 10px; color: #4285f4; font-weight: 900; }
.agenda-upcoming-card { padding-bottom: .4rem; }
.agenda-upcoming-item { display: grid; grid-template-columns: 36px 8px minmax(0, 1fr); gap: .55rem; align-items: center; padding: .68rem 0; border-top: 1px solid #eff1f5; color: inherit; text-decoration: none; }
.agenda-upcoming-item time { display: grid; text-align: center; line-height: 1; }
.agenda-upcoming-item time strong { font-size: .95rem; }
.agenda-upcoming-item time span { margin-top: .2rem; color: #8a94a6; font-size: .58rem; text-transform: uppercase; }
.agenda-upcoming-copy { min-width: 0; display: grid; }
.agenda-upcoming-copy strong, .agenda-upcoming-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-upcoming-copy strong { font-size: .79rem; }
.agenda-upcoming-copy small { margin-top: .15rem; color: #8490a2; font-size: .68rem; }
.agenda-empty { margin: 0; color: #8a94a6; font-size: .82rem; }
.agenda-calendar-item.is-filtered-out { display: none !important; }
.agenda-mobile-list { display: none; }

@media (max-width: 1199px) {
    .agenda-workspace { grid-template-columns: minmax(0, 1fr); }
    .agenda-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .agenda-page-header, .agenda-calendar-toolbar { align-items: stretch; flex-direction: column; }
    .agenda-header-actions .btn { flex: 1 1 auto; }
    .agenda-calendar-toolbar { padding: .85rem; }
    .agenda-period-nav { justify-content: space-between; }
    .agenda-toolbar-actions { justify-content: space-between; }
    .agenda-period-title { min-width: 0; }
    .agenda-calendar-scroll { display: none; }
    .agenda-mobile-list { display: grid; }
    .agenda-mobile-day { padding: 1rem; border-bottom: 1px solid #edf0f5; }
    .agenda-mobile-day:last-child { border-bottom: 0; }
    .agenda-mobile-day.is-today { background: #f3f7ff; }
    .agenda-mobile-day > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
    .agenda-mobile-day > header > div { display: flex; align-items: baseline; gap: .45rem; }
    .agenda-mobile-day > header strong { font-size: .92rem; text-transform: capitalize; }
    .agenda-mobile-day > header span { color: #8a94a6; font-size: .72rem; }
    .agenda-mobile-day-items { display: grid; gap: .5rem; }
    .agenda-mobile-day .agenda-calendar-item { padding: .65rem .75rem; font-size: .85rem; border-radius: 8px; }
    .agenda-mobile-day .agenda-calendar-item > div { display: flex; gap: .4rem; }
    .agenda-mobile-day .agenda-calendar-item small { display: block; margin-top: .2rem; white-space: normal; }
    .agenda-mobile-empty, .agenda-mobile-no-events { color: #98a1b2; font-size: .8rem; }
    .agenda-mobile-no-events { margin: 0; padding: 1.2rem; text-align: center; }
    .agenda-context { grid-template-columns: 1fr; }
    .agenda-day-add { opacity: 1; }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: var(--crm-bg);
    color: var(--crm-ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}
body.modal-form-body {
    min-height: 100%;
    background: #fff;
}
.modal-form-content {
    width: 100%;
    padding: 1rem;
}
.modal-form-content .card {
    box-shadow: none;
}
a { color: var(--crm-blue); text-decoration: none; }
a:hover { color: var(--crm-blue-dark); text-decoration: underline; }

/* Local Bootstrap-like essentials, so the UI remains designed without CDN. */
.d-flex { display: flex; }
.d-inline { display: inline; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: 1rem; }
.text-end { text-align: end; }
.text-center { text-align: center; }
.text-muted { color: var(--crm-muted) !important; }
.text-danger { color: var(--crm-danger) !important; }
.text-success { color: var(--crm-success) !important; }
.fw-semibold { font-weight: 650; }
.small, small { font-size: .84rem; }
.h3, h1 { font-size: 1.55rem; line-height: 1.2; font-weight: 700; }
.h4 { font-size: 1.25rem; }
.h5, h2 { font-size: 1.05rem; line-height: 1.3; font-weight: 700; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.p-3 { padding: 1rem !important; }
.w-100 { width: 100%; }
.min-vh-100 { min-height: 100vh; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.row > [class*="col-"] {
    width: auto;
    max-width: none;
    min-width: 0;
}
.g-2 { gap: .5rem; }
.g-3 { gap: 1rem; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }
.col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-lg-5, .col-lg-7 { grid-column: span 12; }
.table-responsive { overflow-x: auto; }
.table-responsive.has-open-popover { overflow: visible; }
.table-responsive, .table-wrap { max-width: 100%; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .85rem 1rem; border-bottom: 1px solid var(--crm-soft-line); vertical-align: middle; }
.table th { color: var(--crm-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; background: #f8fafc; }
.table-hover tbody tr:hover { background: #f8fafc; }
.clients-search-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: .65rem; align-items: stretch; }
.clients-search-form > * { min-width: 0; }
.clients-hidden-filter { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem .85rem; border: 1px solid #6c757d; border-radius: var(--bs-border-radius, .375rem); color: #495057; background: #fff; cursor: pointer; white-space: nowrap; }
.clients-hidden-filter input { margin: 0; }
.monthly-receipts-row { cursor: pointer; }
.monthly-receipts-row:hover,
.monthly-receipts-row:focus,
.monthly-receipts-row.is-open { background: #eef4ff; outline: none; }
.monthly-receipts-arrow {
    display: inline-block;
    margin-inline-end: .35rem;
    font-size: 1.2rem;
    line-height: 1;
    transition: transform .15s ease;
}
.monthly-receipts-row.is-open .monthly-receipts-arrow { transform: rotate(90deg); }
.monthly-receipts-detail > td { padding: 0; background: #f8fafc; }
.monthly-receipts-detail .table { min-width: 980px; }
.monthly-receipts-detail .table th,
.monthly-receipts-detail .table td { padding: .65rem .8rem; }
.invoice-number-form {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 230px;
}
.invoice-number-form .form-control { min-width: 130px; }
.form-select-sm { min-height: 32px; padding: .35rem 1.8rem .35rem .55rem; font-size: .84rem; }
.case-status-form { min-width: 145px; }
.uninvoiced-table.is-loading { opacity: .55; pointer-events: none; }
.mb-0.table { margin-bottom: 0; }
.form-label { display: block; color: #344054; font-size: .86rem; font-weight: 650; margin-bottom: .35rem; }
.form-control, .form-select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    background: #fff;
    color: var(--crm-ink);
    padding: .55rem .7rem;
    font: inherit;
}
textarea.form-control { min-height: 96px; resize: vertical; }
.form-control:focus, .form-select:focus {
    outline: 3px solid rgba(56, 95, 159, .16);
    border-color: var(--crm-blue);
}
.input-group { display: flex; gap: .5rem; }
.input-group .form-control { flex: 1; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: .48rem .85rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--crm-blue); color: #fff; border-color: var(--crm-blue); }
.btn-primary:hover { background: var(--crm-blue-dark); color: #fff; }
.btn-outline-secondary { color: #344054; border-color: #cfd6e2; background: #fff; }
.btn-outline-secondary:hover { background: #f2f4f7; color: #1d2939; }
.btn-outline-danger { color: var(--crm-danger); border-color: #f3b8b2; background: #fff; }
.btn-outline-success { color: var(--crm-success); border-color: #a6e4c4; background: #fff; }
.btn-sm { min-height: 32px; padding: .35rem .6rem; font-size: .84rem; }
.form-control-sm { min-height: 32px; padding: .35rem .55rem; font-size: .84rem; }
.btn-link { border: 0; color: var(--crm-blue); background: transparent; }
.alert { border-radius: 7px; padding: .8rem 1rem; margin-bottom: 1rem; }
.alert-danger { background: #fff1f0; border: 1px solid #f3b8b2; color: #912018; }
.list-group { display: grid; }
.list-group-item { padding: .75rem 1rem; border-bottom: 1px solid var(--crm-soft-line); background: #fff; }
.list-group-flush .list-group-item:first-child { border-top: 0; }
.border-top { border-top: 1px solid var(--crm-soft-line); }
.badge, .badge-soft {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .76rem;
    font-weight: 700;
}
.badge-soft { background: #eef4ff; color: #2d4d80; }
.task-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-width: 92px;
    font-weight: 750;
}
.task-priority-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: .72rem;
    line-height: 1;
    font-weight: 850;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .14);
}
.task-priority-badge.priority-urgent { color: #b42318; }
.task-priority-badge.priority-urgent .task-priority-icon { background: #d92d20; }
.task-priority-badge.priority-high { color: #b54708; }
.task-priority-badge.priority-high .task-priority-icon { background: #f79009; }
.task-priority-badge.priority-normal { color: #2d4d80; }
.task-priority-badge.priority-normal .task-priority-icon { background: #385f9f; }
.task-priority-badge.priority-low { color: #667085; }
.task-priority-badge.priority-low .task-priority-icon { background: #98a2b3; }
.task-status-badge.status-done,
.task-status-badge.status-action_taken,
.task-status-badge.status-cancelled { background: #f2f4f7; color: #667085; }
.task-category-personal { background: #f3e8ff; color: #6b21a8; }
.display-6 { font-size: 2rem; font-weight: 750; line-height: 1; }
dl.row { row-gap: .55rem; }
dt { color: var(--crm-muted); font-weight: 700; }
dd { margin: 0; }

/* App shell */
.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--crm-bg);
}
.mobile-sidebar-backdrop,
.mobile-menu-toggle {
    display: none;
}
.sidebar {
    position: sticky;
    top: 0;
    width: 282px;
    flex: 0 0 282px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
    color: #fff;
    background: linear-gradient(180deg, var(--crm-sidebar), var(--crm-sidebar-2));
    box-shadow: 8px 0 24px rgba(17, 24, 39, .12);
}
.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 52px;
    margin-bottom: 1.25rem;
    color: #fff;
    font-weight: 760;
    font-size: 1.15rem;
}
.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--crm-accent);
    color: #111827;
    font-weight: 800;
}
.sidebar-nav {
    display: grid;
    gap: .35rem;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 44px;
    padding: .7rem .8rem;
    color: rgba(255, 255, 255, .78);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 650;
}
.sidebar-nav a span {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .7);
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, .11);
}
.sidebar-nav a.active {
    box-shadow: inset 3px 0 0 var(--crm-accent);
}
[dir="rtl"] .sidebar-nav a.active {
    box-shadow: inset -3px 0 0 var(--crm-accent);
}
.sidebar-footer {
    margin-top: auto;
    padding: .9rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: #fff;
}
.sidebar-footer small { color: rgba(255,255,255,.64); }
.sidebar-mobile-account { display: none; }
.content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.6rem;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--crm-soft-line);
    backdrop-filter: blur(8px);
}
.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--crm-soft-line);
    border-radius: 8px;
    background: #fff;
    color: var(--crm-ink);
    cursor: pointer;
}
.mobile-menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}
.topbar-title { font-weight: 750; }
.topbar-subtitle { color: var(--crm-muted); font-size: .84rem; }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.lang-link,
.logout-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: .35rem .65rem;
    border: 1px solid var(--crm-soft-line);
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-size: .84rem;
    font-weight: 700;
}
.logout-link { color: var(--crm-danger); }
.main-content {
    width: min(1320px, 100%);
    padding: 1.6rem;
    overflow-x: hidden;
}
.card, .table-wrap {
    background: var(--crm-panel);
    border: 1px solid var(--crm-soft-line);
    border-radius: var(--crm-radius);
    box-shadow: var(--crm-shadow);
}
.card h2:first-child,
.card .h5:first-child { margin-top: 0; }
.stat {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 4px solid var(--crm-accent);
}
[dir="rtl"] .stat {
    border-left: 1px solid var(--crm-soft-line);
    border-right: 4px solid var(--crm-accent);
}

/* Dashboard agenda */
.dashboard-agenda-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.dashboard-agenda-badge.is-event {
    background: #eef4ff;
    color: #2d4d80;
}
.dashboard-agenda-badge.is-task {
    background: #ecfdf3;
    color: #027a48;
}
.dashboard-agenda-badge.is-opposing-deadline,
.calendar-tooltip-badge.is-opposing-deadline {
    background: #fff1f3;
    color: #c01048;
}
.calendar-tooltip-badge.is-task {
    background: #ecfdf3;
    color: #027a48;
}
.dashboard-agenda-badge.is-personal-task,
.calendar-tooltip-badge.is-personal-task {
    background: #f3e8ff;
    color: #6b21a8;
}
.calendar-tooltip-badge.is-event {
    background: #eef4ff;
    color: #2d4d80;
}
.calendar-tooltip-badge.is-personal-event {
    background: #fff1f3;
    color: #c01048;
}
.calendar-tooltip-badge.is-jewish-holiday {
    background: #fff8dc;
    color: #7a5900;
}
.dashboard-agenda-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
    flex-wrap: wrap;
}
.task-action-form {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
}
.task-action-comment {
    width: 150px;
    display: inline-flex;
}

/* Operational dashboard */
.dashboard-page {
    display: grid;
    gap: 1.15rem;
}
.dashboard-page-header,
.dashboard-section-heading,
.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.dashboard-page-header {
    align-items: flex-end;
}
.dashboard-eyebrow {
    margin-bottom: .25rem;
    color: var(--crm-accent-dark);
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.dashboard-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}
.dashboard-focus-section {
    min-width: 0;
}
.dashboard-section-heading {
    margin-bottom: .7rem;
}
.dashboard-section-link {
    flex-shrink: 0;
    color: var(--crm-blue);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}
.dashboard-section-link::after {
    content: '›';
    display: inline-block;
    margin-inline-start: .25rem;
}
[dir="rtl"] .dashboard-section-link::after { transform: rotate(180deg); }
.dashboard-section-link:hover { text-decoration: underline; }
.dashboard-task-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(245px, 1fr);
    gap: .8rem;
    overflow-x: auto;
    padding: .15rem .1rem .65rem;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
    scrollbar-color: #cfd6e2 transparent;
}
.dashboard-task-card {
    position: relative;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--crm-soft-line);
    border-top: 3px solid var(--crm-blue);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(23, 32, 51, .06);
    scroll-snap-align: start;
}
.dashboard-task-card.priority-urgent,
.dashboard-task-card.is-overdue { border-top-color: var(--crm-danger); }
.dashboard-task-card.priority-high { border-top-color: #dc6803; }
.dashboard-task-card.priority-low { border-top-color: #98a2b3; }
.dashboard-task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.dashboard-task-status,
.dashboard-task-due {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: .18rem .5rem;
    background: #f2f4f7;
    color: #475467;
    font-size: .7rem;
    font-weight: 750;
}
.dashboard-task-status.is-progress {
    background: #eef4ff;
    color: var(--crm-blue-dark);
}
.dashboard-task-due.is-overdue {
    background: #fff1f0;
    color: var(--crm-danger);
}
.dashboard-task-card-title {
    margin: .8rem 0 .35rem;
    color: var(--crm-ink);
    font-size: .96rem;
    line-height: 1.35;
    font-weight: 750;
}
.dashboard-task-context {
    color: var(--crm-muted);
    font-size: .78rem;
    line-height: 1.35;
}
.dashboard-task-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: auto;
    padding-top: .75rem;
}
.dashboard-task-actions form { margin: 0; }
.dashboard-empty-state {
    min-height: 140px;
    min-width: 280px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: .45rem;
    border: 1px dashed #cfd6e2;
    border-radius: 9px;
    background: rgba(255,255,255,.6);
    color: var(--crm-muted);
}
.dashboard-empty-state span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ecfdf3;
    color: var(--crm-success);
    font-size: 1.2rem;
}
.dashboard-workspace {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
    gap: 1rem;
    align-items: start;
}
.dashboard-main-column,
.dashboard-context-column {
    min-width: 0;
    display: grid;
    gap: 1rem;
}
.dashboard-context-column {
    position: sticky;
    top: 1rem;
}
.dashboard-cases-card,
.dashboard-upcoming-card {
    overflow: hidden;
}
.dashboard-card-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--crm-soft-line);
}
.dashboard-card-header.compact {
    padding: 0 0 .8rem;
}
.dashboard-cases-table th {
    white-space: nowrap;
}
.dashboard-cases-table td {
    padding-top: .72rem;
    padding-bottom: .72rem;
}
.dashboard-case-title {
    display: block;
    max-width: 260px;
    overflow: hidden;
    color: var(--crm-ink);
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-case-title:hover { color: var(--crm-blue); }
.dashboard-count-pill {
    min-width: 27px;
    height: 27px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    padding: 0 .4rem;
    background: #eef4ff;
    color: var(--crm-blue-dark);
    font-size: .76rem;
    font-weight: 800;
}
.dashboard-case-status { white-space: nowrap; }
.dashboard-case-status.status-in_progress {
    background: #ecfdf3;
    color: var(--crm-success);
}
.dashboard-table-empty {
    padding: 1.5rem !important;
    color: var(--crm-muted);
    text-align: center;
}
.dashboard-insights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}
.dashboard-insight-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem;
    border: 1px solid var(--crm-soft-line);
    border-radius: 8px;
    background: #fff;
    color: var(--crm-ink);
    box-shadow: 0 7px 18px rgba(23, 32, 51, .05);
    text-decoration: none;
}
.dashboard-insight-card:hover {
    border-color: #cfd6e2;
    color: var(--crm-ink);
    text-decoration: none;
    transform: translateY(-1px);
}
.dashboard-insight-card > span:last-child {
    min-width: 0;
    display: grid;
}
.dashboard-insight-card strong {
    overflow: hidden;
    font-size: 1.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-insight-card small {
    overflow: hidden;
    color: var(--crm-muted);
    font-size: .7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-insight-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--crm-blue);
    font-weight: 850;
}
.dashboard-insight-icon.is-danger { background: #fff1f0; color: var(--crm-danger); }
.dashboard-insight-icon.is-gold { background: #faf4e8; color: var(--crm-accent-dark); }
.dashboard-insight-icon.is-green { background: #ecfdf3; color: var(--crm-success); }
.dashboard-birthdays-list {
    display: flex;
    align-items: center;
    gap: .55rem;
    overflow-x: auto;
    padding-bottom: .15rem;
}
.dashboard-birthdays-list a {
    min-width: 170px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: .5rem;
    padding: .6rem .7rem;
    border: 1px solid var(--crm-soft-line);
    border-radius: 8px;
    color: var(--crm-ink);
    text-decoration: none;
}
.dashboard-birthdays-list a:hover { background: #f8fafc; }
.dashboard-birthdays-list a > span:nth-child(2) {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-birthdays-list small { grid-column: 2; }
.dashboard-birthday-avatar {
    grid-row: 1 / span 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #faf4e8;
    color: var(--crm-accent-dark);
}
.dashboard-upcoming-list {
    max-height: 430px;
    overflow-y: auto;
}
.dashboard-upcoming-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--crm-soft-line);
    color: var(--crm-ink);
    text-decoration: none;
}
.dashboard-upcoming-item:last-child { border-bottom: 0; }
.dashboard-upcoming-item:hover {
    background: #f8fafc;
    color: var(--crm-ink);
    text-decoration: none;
}
.dashboard-upcoming-date {
    width: 42px;
    min-height: 43px;
    display: grid;
    place-content: center;
    justify-items: center;
    border-radius: 8px;
    background: #f2f4f7;
    line-height: 1;
}
.dashboard-upcoming-date strong { font-size: 1rem; }
.dashboard-upcoming-date small { margin-top: .25rem; color: var(--crm-muted); font-size: .62rem; }
.dashboard-upcoming-body {
    min-width: 0;
    display: grid;
    gap: .2rem;
}
.dashboard-upcoming-title {
    overflow: hidden;
    font-size: .87rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-upcoming-body small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-upcoming-kind {
    max-width: 88px;
    overflow: hidden;
    border-radius: 999px;
    padding: .2rem .45rem;
    background: #eef4ff;
    color: var(--crm-blue-dark);
    font-size: .65rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-upcoming-kind.is-personal {
    background: #fff1f3;
    color: #c01048;
}

/* Billable hour popover */
.popover-wrap {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}
.edit-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + .45rem);
    right: 0;
    width: min(520px, 86vw);
    padding: .9rem;
    border: 1px solid var(--crm-line);
    border-radius: 8px;
    background: #fff;
    color: var(--crm-ink);
    box-shadow: 0 18px 40px rgba(23, 32, 51, .18);
    text-align: start;
}
[dir="rtl"] .edit-popover {
    right: auto;
    left: 0;
}
.billable-edit-check {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: .45rem;
}

/* Dashboard calendar */
.dashboard-calendar-card {
    overflow: visible;
}
.dashboard-calendar-card.is-loading {
    opacity: .65;
    pointer-events: none;
}
.calendar-title {
    display: flex;
    align-items: baseline;
    gap: .45rem;
    flex-wrap: wrap;
}
.calendar-title-month {
    font-weight: 750;
}
.calendar-title-jewish {
    color: var(--crm-muted);
    font-size: .9rem;
    font-weight: 650;
}
.calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.calendar-nav-button {
    width: 32px;
    min-width: 32px;
    padding-right: 0;
    padding-left: 0;
}
.dashboard-calendar {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: .35rem;
}
.dashboard-calendar th {
    color: var(--crm-muted);
    font-size: .74rem;
    font-weight: 750;
    text-align: center;
    text-transform: uppercase;
}
.dashboard-calendar .calendar-day {
    position: relative;
    height: 46px;
    padding: 0;
    border: 1px solid var(--crm-soft-line);
    border-radius: 7px;
    background: #fff;
    vertical-align: top;
}
.dashboard-calendar .calendar-day-inner {
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .25rem;
    padding: .38rem;
}
.dashboard-calendar .calendar-day-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .18rem;
    min-width: 0;
    line-height: 1;
}
.dashboard-calendar .calendar-day.is-muted {
    color: #98a2b3;
    background: #f8fafc;
}
.dashboard-calendar .calendar-day.has-items {
    border-color: #9fb7df;
    background: #eef4ff;
    color: #1f3e70;
    cursor: default;
}
.dashboard-calendar .calendar-day.is-today {
    border-color: var(--crm-accent);
    background: #fff7e8;
    color: #6f4f1d;
    box-shadow: inset 0 0 0 1px rgba(176, 141, 87, .35);
}
.dashboard-calendar .calendar-day.has-items.is-today {
    background: linear-gradient(135deg, #fff7e8 0%, #eef4ff 100%);
}
.dashboard-calendar .calendar-day:focus {
    outline: 3px solid rgba(56, 95, 159, .16);
}
.dashboard-calendar .calendar-day-number {
    font-weight: 750;
    line-height: 1;
}
.dashboard-calendar .calendar-day-jewish {
    color: #8a94a6;
    font-size: .64rem;
    font-weight: 600;
}
.dashboard-calendar .calendar-dot {
    position: absolute;
    right: .3rem;
    top: .3rem;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--crm-blue);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
}
.dashboard-calendar .calendar-dot-personal {
    top: auto;
    bottom: .3rem;
    background: #c01048;
}
.calendar-color-swatch {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, .16);
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
}
.personal-type-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(320px, 2fr) minmax(120px, auto);
    gap: 1rem;
    align-items: end;
}
.personal-type-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    gap: .75rem;
    align-items: end;
    padding-top: .75rem;
    border-top: 1px solid var(--crm-soft-line);
}
.google-color-picker {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.google-color-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.google-color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.google-color-dot {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 50%;
    font-size: 0;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .16);
}
.google-color-option input:checked + .google-color-dot {
    border-color: var(--crm-ink);
    font-size: 13px;
    box-shadow: 0 0 0 3px rgba(56, 95, 159, .16);
}
.google-color-option.is-empty span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: .25rem .55rem;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-size: .84rem;
    font-weight: 650;
}
.google-color-option.is-empty input:checked + span {
    border-color: var(--crm-blue);
    box-shadow: 0 0 0 3px rgba(56, 95, 159, .16);
}
[dir="rtl"] .dashboard-calendar .calendar-dot {
    right: auto;
    left: .3rem;
}
.dashboard-calendar .calendar-tooltip {
    position: fixed;
    z-index: 30;
    top: 0;
    left: 0;
    width: min(320px, 82vw);
    max-height: min(380px, calc(100vh - 1.5rem));
    overflow: auto;
    display: none;
    padding: .75rem;
    border: 1px solid var(--crm-line);
    border-radius: 8px;
    background: #fff;
    color: var(--crm-ink);
    box-shadow: 0 18px 40px rgba(23, 32, 51, .18);
    font-size: .84rem;
    line-height: 1.45;
    text-align: start;
}
.dashboard-calendar .calendar-day.has-items:hover .calendar-tooltip,
.dashboard-calendar .calendar-day.has-items:focus .calendar-tooltip,
.dashboard-calendar .calendar-day.has-items:focus-within .calendar-tooltip {
    display: block;
}
.dashboard-calendar .calendar-tooltip-date {
    margin-bottom: .45rem;
    font-weight: 750;
}
.dashboard-calendar .calendar-tooltip-shabbat {
    display: grid;
    gap: .35rem;
    padding: .55rem .65rem;
    border-radius: 7px;
    background: #f3f6ff;
    color: #243b6b;
}
.dashboard-calendar .calendar-tooltip-shabbat > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .65rem;
}
.dashboard-calendar .calendar-tooltip-shabbat > div > span:first-child { font-weight: 750; }
.dashboard-calendar .calendar-tooltip-shabbat > div > span:last-child { text-align: end; }
.dashboard-calendar .calendar-tooltip-item {
    display: grid;
    gap: .2rem;
    padding-top: .55rem;
    margin-top: .55rem;
    border-top: 1px solid var(--crm-soft-line);
    color: inherit;
    text-decoration: none;
}
.dashboard-calendar .calendar-tooltip-item:hover {
    color: inherit;
    text-decoration: none;
}
.dashboard-calendar .calendar-tooltip-item:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}
.dashboard-calendar .calendar-tooltip-title {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}
.dashboard-calendar .calendar-tooltip-context {
    color: var(--crm-muted);
    font-size: .8rem;
}
.dashboard-calendar .calendar-tooltip-remaining {
    color: var(--crm-success);
    font-size: .8rem;
    font-weight: 750;
}
.dashboard-calendar .calendar-tooltip-remaining.is-urgent {
    color: var(--crm-danger);
}

/* Overlay forms */
.overlay-form-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, .52);
}
.overlay-form-dialog {
    width: min(980px, 96vw);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 8px;
    border: 1px solid var(--crm-line);
    background: #fff;
    box-shadow: 0 24px 70px rgba(17, 24, 39, .32);
    overflow: hidden;
}
.overlay-form-header {
    min-height: 48px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: .5rem .7rem;
    border-bottom: 1px solid var(--crm-soft-line);
    background: #f8fafc;
}
.overlay-form-close {
    width: 34px;
    min-width: 34px;
    padding-left: 0;
    padding-right: 0;
}
.overlay-form-frame {
    width: 100%;
    height: min(760px, calc(92vh - 48px));
    border: 0;
    background: #fff;
}
/* Login */
.login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(25,34,51,.86), rgba(56,95,159,.62)),
        linear-gradient(45deg, #eef2f6, #ffffff);
}
.login-card {
    width: min(430px, 100%);
    background: #fff;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 24px 70px rgba(17, 24, 39, .24);
}
.login-card h1 { margin-top: 0; }

/* Unified contact directory */
.directory-page { display: grid; gap: 1rem; }
.directory-filters { display: grid; gap: .85rem; }
.directory-search-row { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: .7rem; align-items: end; }
.directory-filter-search { min-width: 0; display: grid; gap: .3rem; }
.directory-filter-search > span { color: var(--crm-muted); font-size: .72rem; font-weight: 700; }
.directory-filter-toggle { display: none; }
.directory-search-submit { min-width: 110px; }
.directory-filter-grid { display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(5, minmax(135px, 1fr)); gap: .7rem; align-items: end; }
.directory-filter-grid label { min-width: 0; display: grid; gap: .3rem; }
.directory-filter-grid label > span { color: var(--crm-muted); font-size: .72rem; font-weight: 700; }
.directory-filter-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .75rem; border-top: 1px solid var(--crm-soft-line); }
.directory-filter-footer > div { display: flex; align-items: center; gap: .5rem; }
.directory-filter-check { display: flex; align-items: center; gap: .45rem; color: #475467; font-size: .84rem; }
.directory-mobile-results { display: none; }
.directory-phone-actions { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.directory-whatsapp { width: 26px; height: 26px; flex: 0 0 26px; display: inline-grid; place-items: center; text-decoration: none; filter: drop-shadow(0 2px 3px rgba(18, 140, 126, .22)); }
.directory-whatsapp img { display: block; width: 100%; height: 100%; object-fit: contain; }
.directory-whatsapp:hover { text-decoration: none; transform: translateY(-1px) scale(1.04); }
.contact-usage-help { display: grid; gap: .35rem; margin-bottom: 1.1rem; padding: .85rem 1rem; border: 1px solid #c9d8ef; border-radius: 10px; background: #f5f8fd; }
.contact-usage-help > strong { color: var(--crm-ink); }
.contact-usage-help > span { color: var(--crm-muted); font-size: .84rem; }
.contact-usage-help > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.contact-mode-card { min-height: 100%; display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .85rem; border: 1px solid #cfd6e2; border-radius: 8px; background: #fafbfc; cursor: pointer; }
.contact-mode-card input { flex: 0 0 auto; margin-top: .18rem; }
.contact-mode-card span { min-width: 0; display: grid; gap: .15rem; }
.contact-mode-card strong { font-size: .88rem; }
.contact-mode-card small { color: var(--crm-muted); line-height: 1.35; }
.professional-section-heading { margin-top: .25rem; padding-top: 1rem; border-top: 1px solid var(--crm-soft-line); }
.professional-section-heading h2 { margin-bottom: .2rem; }
.professional-section-heading p { margin: 0 0 .9rem; color: var(--crm-muted); font-size: .84rem; }
.professional-assignment-fields { padding: .9rem; border: 1px solid #e3e8ef; border-radius: 10px; background: #fbfcfe; }
.directory-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.directory-header h1 { margin: 0 0 .25rem; font-size: 1.65rem; }
.directory-subtitle { color: var(--crm-muted); }
.directory-header-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.directory-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.directory-sidebar, .directory-main { min-width: 0; display: grid; gap: 1rem; }
.directory-card { padding: 1rem; }
.directory-card h2 { margin: 0 0 .9rem; font-size: 1rem; }
.contact-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.contact-summary-grid > div { min-width: 0; display: grid; gap: .18rem; }
.contact-summary-grid span, .linked-client-editor label > span, .interaction-form label > span { color: var(--crm-muted); font-size: .72rem; font-weight: 700; }
.contact-summary-grid strong, .contact-summary-grid a { overflow-wrap: anywhere; font-size: .92rem; }
.directory-notes { margin-top: .9rem; padding: .75rem; border-radius: 8px; background: #f7f9fc; color: #475467; font-size: .88rem; }
.directory-verify-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; margin-top: 1rem; }
.linked-client-editor { position: relative; display: grid; gap: .65rem; padding: .85rem 0; border-top: 1px solid var(--crm-soft-line); }
.linked-client-editor:first-of-type { border-top: 0; padding-top: 0; }
.linked-client-title { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; font-weight: 700; }
.linked-client-editor > label { display: grid; gap: .3rem; }
.linked-client-options { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .78rem; color: #475467; }
.linked-client-actions { display: flex; justify-content: flex-end; }
.directory-add-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .7fr) auto; gap: .45rem; padding-top: .85rem; border-top: 1px solid var(--crm-soft-line); }
.directory-link-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--crm-soft-line); }
.directory-link-row:first-of-type { border-top: 0; padding-top: 0; }
.directory-link-row span { min-width: 0; }
.directory-link-row small { display: block; color: var(--crm-muted); }
.interaction-form { display: grid; grid-template-columns: minmax(155px, .9fr) minmax(150px, 1fr) minmax(130px, .8fr); gap: .75rem; }
.interaction-subject, .interaction-notes { grid-column: 1 / -1; }
.interaction-cases { grid-column: span 2; display: grid; gap: .3rem; }
.interaction-followup { display: grid; align-content: start; gap: .3rem; }
.interaction-submit { grid-column: 1 / -1; }
.interaction-item { padding: .9rem 0; border-top: 1px solid var(--crm-soft-line); }
.interaction-item:first-of-type { border-top: 0; padding-top: 0; }
.interaction-item > div { display: flex; justify-content: space-between; gap: 1rem; }
.interaction-item time, .interaction-item small { color: var(--crm-muted); font-size: .76rem; }
.interaction-item p { margin: .5rem 0 0; }
.interaction-item em { display: block; margin-top: .45rem; color: #b54708; font-size: .8rem; }
.directory-activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

@media (max-width: 1050px) {
    .directory-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .directory-filter-search { grid-column: span 2; }
    .directory-layout { grid-template-columns: 1fr; }
    .directory-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .directory-sidebar > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .directory-search-row { grid-template-columns: minmax(0, 1fr) auto; }
    .directory-filter-search > span { display: none; }
    .directory-search-submit { min-width: 0; }
    .directory-advanced-filters { border-top: 1px solid var(--crm-soft-line); padding-top: .75rem; }
    .directory-filter-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--crm-blue); font: inherit; font-weight: 750; }
    .directory-filter-toggle::after { content: '+'; font-size: 1.25rem; line-height: 1; }
    .directory-advanced-filters.is-open .directory-filter-toggle::after { content: '−'; }
    .directory-filter-panel { display: none; padding-top: .85rem; }
    .directory-advanced-filters.is-open .directory-filter-panel { display: block; }
    .directory-filter-grid { grid-template-columns: 1fr; }
    .directory-filter-footer { align-items: flex-start; flex-direction: column; }
    .directory-filter-footer > div, .directory-filter-footer > div .btn { width: 100%; }
    .directory-desktop-results { display: none; }
    .directory-mobile-results { display: grid; gap: .75rem; }
    .directory-contact-card { padding: .9rem; }
    .directory-contact-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
    .directory-contact-name { display: inline-block; font-size: 1.03rem; font-weight: 750; }
    .directory-contact-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
    .directory-contact-position { margin-top: .65rem; color: #475467; }
    .directory-contact-details { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .55rem; font-size: .86rem; }
    .directory-contact-details .directory-whatsapp { width: 32px; height: 32px; flex-basis: 32px; }
    .directory-contact-details span { color: var(--crm-muted); }
    .directory-contact-verified { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .7rem; padding-top: .65rem; border-top: 1px solid var(--crm-soft-line); color: var(--crm-muted); font-size: .76rem; }
    .directory-header { display: grid; }
    .directory-layout, .directory-sidebar, .directory-activity-grid { grid-template-columns: 1fr; }
    .contact-summary-grid, .interaction-form { grid-template-columns: 1fr; }
    .interaction-form > *, .interaction-cases, .interaction-subject, .interaction-notes, .interaction-submit { grid-column: 1; }
    .directory-add-form { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
    .col-md-2 { grid-column: span 2; }
    .col-md-3 { grid-column: span 3; }
    .col-md-4 { grid-column: span 4; }
    .col-md-5 { grid-column: span 5; }
    .col-md-6 { grid-column: span 6; }
    .col-md-7 { grid-column: span 7; }
    .col-md-8 { grid-column: span 8; }
    .col-md-9 { grid-column: span 9; }
    .col-sm-4 { grid-column: span 4; }
    .col-sm-8 { grid-column: span 8; }
}
@media (min-width: 992px) {
    .col-lg-5 { grid-column: span 5; }
    .col-lg-7 { grid-column: span 7; }
    .p-lg-4 { padding: 1.5rem !important; }
}
@media (min-width: 1200px) {
    .col-xl-3 { grid-column: span 3; }
}
@media (max-width: 1199px) {
    .dashboard-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-context-column {
        position: static;
        order: -1;
        grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr);
        align-items: start;
    }
    .dashboard-context-column .dashboard-calendar-card { margin-bottom: 0 !important; }
    .dashboard-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .dashboard-calendar-column {
        order: -1;
    }

    .dashboard-agenda-column {
        order: 1;
    }

    body.sidebar-open {
        overflow: hidden;
    }
    .app-shell { display: block; }
    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 80;
        display: block;
        pointer-events: none;
        background: rgba(17, 24, 39, .42);
        opacity: 0;
        transition: opacity .18s ease;
    }
    body.sidebar-open .mobile-sidebar-backdrop {
        pointer-events: auto;
        opacity: 1;
    }
    .sidebar {
        position: fixed;
        z-index: 90;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(312px, 86vw);
        height: 100dvh;
        min-height: 100vh;
        overflow-y: auto;
        box-shadow: 18px 0 40px rgba(17, 24, 39, .28);
        transform: translateX(-105%);
        transition: transform .22s ease;
    }
    [dir="rtl"] .sidebar {
        right: 0;
        left: auto;
        box-shadow: -18px 0 40px rgba(17, 24, 39, .28);
        transform: translateX(105%);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .brand { margin-bottom: .75rem; }
    .sidebar-nav { grid-template-columns: 1fr; }
    .sidebar-footer { margin-top: 1rem; }
    .sidebar-mobile-account { display: grid; gap: .65rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.12); }
    .sidebar-mobile-languages { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
    .sidebar-mobile-languages a, .sidebar-mobile-logout { min-height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; color: #fff; font-weight: 700; }
    .sidebar-mobile-logout { color: #ffb4ad; }
    .mobile-menu-toggle { display: inline-flex; }
    .topbar {
        position: sticky;
        top: 0;
        z-index: 70;
        min-height: 64px;
        padding: .7rem .9rem;
        align-items: center;
    }
    .topbar-actions {
        margin-inline-start: auto;
        justify-content: flex-end;
    }
    .main-content {
        width: 100%;
        padding: 1rem;
    }
    .main-content > .d-flex.justify-content-between {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: .75rem;
    }
    .main-content > .d-flex.justify-content-between > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: .45rem;
    }
    .table-responsive {
        border-radius: var(--crm-radius);
        -webkit-overflow-scrolling: touch;
    }
    .table {
        min-width: 720px;
    }
    .dashboard-calendar {
        min-width: 0;
    }
    .dashboard-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .dashboard-quick-actions { justify-content: flex-start; }
    .dashboard-context-column { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
    body { font-size: 14px; }
    .h3, h1 { font-size: 1.35rem; }
    .h5, h2 { font-size: 1rem; }
    .display-6 { font-size: 1.55rem; }
    .topbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: .65rem;
    }
    .topbar-title,
    .topbar-subtitle {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar-actions { display: none; }
    .main-content {
        padding: .85rem;
    }
    .input-group { display: grid; }
    .col-6 { grid-column: span 12; }
    .table th, .table td { padding: .7rem; }
    .card, .table-wrap {
        box-shadow: 0 8px 22px rgba(23, 32, 51, .06);
    }
    .card.p-3,
    .p-3 {
        padding: .85rem !important;
    }
    .btn {
        min-height: 42px;
    }
    .btn-sm {
        min-height: 36px;
    }
    .main-content > .d-flex.justify-content-between > .btn,
    .main-content > .d-flex.justify-content-between > div:last-child,
    .main-content > .d-flex.justify-content-between > div:last-child .btn {
        width: 100%;
    }
    .main-content > .d-flex.justify-content-between > div:last-child {
        display: grid;
        grid-template-columns: 1fr;
    }
    .list-group-item.d-flex,
    .dashboard-agenda .list-group-item > .d-flex {
        display: grid;
        gap: .65rem;
    }
    .dashboard-agenda-actions {
        justify-content: flex-start;
    }
    .dashboard-page-header {
        display: grid;
    }
    .dashboard-quick-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .dashboard-quick-actions .btn { width: 100%; }
    .dashboard-task-strip {
        grid-auto-columns: minmax(82vw, 1fr);
        margin-inline: -.2rem;
    }
    .dashboard-task-actions { flex-wrap: wrap; }
    .dashboard-card-header { align-items: flex-start; }
    .dashboard-insights { grid-template-columns: minmax(0, 1fr); }
    .dashboard-upcoming-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }
    .dashboard-upcoming-kind {
        grid-column: 2;
        justify-self: start;
    }
    .task-action-form {
        display: grid;
        width: 100%;
    }
    .task-action-comment {
        width: 100%;
    }
    .personal-type-form,
    .personal-type-row {
        grid-template-columns: 1fr;
    }
    dl.row {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: .2rem;
    }
    dl.row dt {
        margin-top: .45rem;
    }
    .dashboard-calendar {
        border-spacing: .2rem;
    }
    .dashboard-calendar th {
        font-size: .66rem;
    }
    .dashboard-calendar .calendar-day-inner {
        min-height: 40px;
        padding: .3rem;
    }
    .dashboard-calendar .calendar-dot {
        min-width: 16px;
        height: 16px;
        font-size: .64rem;
    }
    .dashboard-calendar .calendar-tooltip {
        position: fixed;
        right: .75rem;
        left: .75rem;
        top: auto;
        bottom: .75rem;
        width: auto;
        max-height: 58vh;
        overflow: auto;
        transform: none !important;
    }
    .edit-popover {
        position: fixed;
        right: .75rem;
        left: .75rem;
        top: auto;
        bottom: .75rem;
        width: auto;
        max-height: 76vh;
        overflow: auto;
    }
    .overlay-form-backdrop {
        padding: .5rem;
        align-items: stretch;
    }
    .overlay-form-dialog {
        width: 100%;
        max-height: none;
    }
    .overlay-form-frame {
        height: calc(100dvh - 65px);
    }
}

@media (max-width: 767px) {
    .clients-page-header { align-items: stretch !important; flex-direction: column; }
    .clients-page-header .btn { width: 100%; }
    .clients-search-form { grid-template-columns: minmax(0, 1fr); }
    .clients-search-form .form-control,
    .clients-search-form .btn,
    .clients-hidden-filter { width: 100%; min-height: 46px; }
    .clients-list-wrap { overflow: visible; background: transparent; box-shadow: none; }
    .clients-list { min-width: 0; display: block; }
    .clients-list thead { display: none; }
    .clients-list tbody { display: grid; gap: .75rem; }
    .clients-list tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem 1rem; padding: 1rem; border: 1px solid var(--crm-soft-line); border-radius: var(--crm-radius); background: #fff; box-shadow: 0 5px 16px rgba(26, 39, 74, .05); }
    .clients-list td { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .6rem; padding: 0; border: 0; overflow-wrap: anywhere; }
    .clients-list td::before { content: attr(data-label); color: var(--crm-muted); font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
    .clients-list td:empty { display: none; }
    .clients-list .client-name { display: block; grid-column: 1; font-size: 1rem; font-weight: 650; }
    .clients-list .client-name::before,
    .clients-list .client-kind::before,
    .clients-list .client-actions::before { display: none; }
    .clients-list .client-kind { display: block; grid-column: 2; color: var(--crm-muted); font-size: .78rem; white-space: nowrap; }
    .clients-list td:not(.client-name):not(.client-kind):not(.client-actions) { grid-column: 1 / -1; }
    .clients-list .client-actions { display: block; grid-column: 1 / -1; text-align: start !important; }
}
.primary-contact-dialog { width: min(92vw, 520px); padding: 0; border: 0; border-radius: .75rem; box-shadow: 0 1rem 3rem rgba(0,0,0,.22); }
.primary-contact-dialog::backdrop { background: rgba(20, 29, 48, .55); }
.primary-contact-dialog .modal-header, .primary-contact-dialog .modal-body, .primary-contact-dialog .modal-footer { padding: 1rem 1.25rem; }
/* Electronic signatures */
:root{--signature-color-1:#246b8e;--signature-color-2:#9b4d76;--signature-color-3:#477a45;--signature-color-4:#a76420;--signature-color-5:#6553a3;--signature-color-6:#a33f3f}
.signature-upload-card{max-width:760px}
.signature-status{display:inline-flex;align-items:center;white-space:nowrap;padding:.28rem .62rem;border-radius:999px;background:#eef2f4;color:#43515a;font-size:.78rem;font-weight:700}
.signature-status-signed{background:#dff3e7;color:#17633a}.signature-status-partially_signed,.signature-status-viewed{background:#fff0cf;color:#805700}.signature-status-pending{background:#dcecf5;color:#205b78}.signature-status-cancelled{background:#f5dddd;color:#852b2b}.signature-status-draft{background:#e9e9ed;color:#555666}
.signature-signer-card{border-inline-start:4px solid var(--signer-color);padding:.85rem 0 .85rem .9rem;margin-bottom:.65rem;border-bottom:1px solid #edf0f2}
[dir=rtl] .signature-signer-card{padding:.85rem .9rem .85rem 0}
.signature-copy-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(260px,3fr) auto;gap:.6rem;align-items:center;margin:.55rem 0}.signature-copy-row small{display:block;color:#6c757d}
.signature-hash{display:grid;grid-template-columns:130px minmax(0,1fr);gap:.5rem;font-size:.78rem;margin:.4rem 0}.signature-hash code{overflow-wrap:anywhere}
.signature-editor{background:#e5eaed;border-radius:10px;padding:12px;min-height:240px;overflow:auto;text-align:center;direction:ltr}
.signature-editor-loading{padding:70px 20px;color:#64747e}
.signature-pdf-page{position:relative;margin:0 auto 18px;background:#fff;box-shadow:0 4px 18px rgba(25,42,52,.17);text-align:left;direction:ltr;unicode-bidi:isolate}
.signature-pdf-page canvas{display:block;direction:ltr}
.signature-page-overlay{position:absolute;inset:0;direction:ltr}
.signature-editor.is-adding-zone .signature-page-overlay{cursor:crosshair}
.signature-field-box{position:absolute;display:flex;align-items:center;justify-content:center;border:2px solid var(--field-color);background:color-mix(in srgb,var(--field-color) 18%,transparent);color:var(--field-color);font-weight:700;font-size:12px;min-width:46px;min-height:25px;overflow:hidden}
.signature-field-box.is-editable{cursor:move;resize:both;touch-action:none}
.signature-field-box>span{pointer-events:none;white-space:nowrap;max-width:90%;overflow:hidden;text-overflow:ellipsis}
.signature-field-remove{position:absolute;inset-block-start:1px;inset-inline-end:1px;border:0;background:var(--field-color);color:#fff;width:20px;height:20px;line-height:16px;border-radius:50%;padding:0}

.public-signature-body{background:#eef2f4;color:#152b39;min-height:100vh}
.public-signature-header{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid #dfe5e8;padding:12px max(16px,calc((100vw - 1050px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px;box-shadow:0 2px 8px rgba(20,42,55,.06)}
.public-signature-header>div{display:flex;flex-direction:column}.public-signature-header span{font-size:.82rem;color:#65737b}.public-signature-header nav{display:flex;gap:5px}.public-signature-header nav a{padding:5px 8px;border-radius:5px;text-decoration:none;color:#4f5f69;font-size:.8rem}.public-signature-header nav a.active{background:#173b57;color:#fff}
.public-signature-main{max-width:1050px;margin:auto;padding:22px 14px 60px}
.public-signature-intro{background:#fff;padding:20px 24px;border-radius:12px;margin-bottom:16px}.public-signature-intro h1{font-size:1.45rem}
.public-signature-progress{display:flex;justify-content:space-between;border-top:1px solid #e7ecef;padding-top:12px;margin-top:14px}
.signature-public-editor{padding:14px}
.signature-public-field{position:absolute;border:2px dashed #1672a4;background:rgba(214,241,255,.8);color:#0b567d;font-size:clamp(9px,1.5vw,14px);font-weight:800;animation:signature-pulse 1.8s infinite;border-radius:4px;overflow:hidden}
.signature-public-field.is-signed{border:2px solid #22824d;background:rgba(226,247,234,.88);animation:none;padding:2px}
.signature-public-field img{width:100%;height:100%;object-fit:contain;display:block}
@keyframes signature-pulse{50%{box-shadow:0 0 0 5px rgba(25,119,166,.13)}}
.public-signature-confirm{background:#fff;padding:20px 24px;border-radius:12px;margin-top:16px;position:sticky;bottom:10px;box-shadow:0 5px 24px rgba(20,42,55,.16)}
.public-signature-complete{max-width:620px;margin:12vh auto;background:#fff;text-align:center;padding:48px 28px;border-radius:16px;box-shadow:0 8px 30px rgba(20,42,55,.1)}
.public-signature-check{width:70px;height:70px;display:grid;place-items:center;background:#dff3e7;color:#17633a;border-radius:50%;font-size:38px;margin:0 auto 20px}
.signature-pad-dialog{width:min(680px,calc(100vw - 24px));border:0;border-radius:14px;padding:0;box-shadow:0 16px 60px rgba(0,0,0,.35)}
.signature-pad-dialog::backdrop{background:rgba(10,24,32,.67)}
.signature-pad-dialog form{padding:18px}.signature-pad-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.signature-pad-header h2{font-size:1.2rem;margin:0}.signature-pad-header button{border:0;background:none;font-size:30px;line-height:1}
.signature-pad-dialog canvas{display:block;width:100%;height:auto;aspect-ratio:900/320;border:2px solid #cbd5db;border-radius:8px;background:#fff;touch-action:none}
.signature-pad-actions{display:flex;justify-content:space-between;margin-top:12px}
@media(max-width:700px){.signature-copy-row{grid-template-columns:1fr auto}.signature-copy-row input{grid-column:1/-1;grid-row:2}.signature-hash{grid-template-columns:1fr}.public-signature-main{padding-inline:6px}.signature-editor{padding:5px}.public-signature-intro,.public-signature-confirm{border-radius:8px;padding:16px}.public-signature-header{padding:10px}.public-signature-header span{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
