.client-list-container {
    max-width: var(--staff-table-page-max-width, min(96vw, 1480px));
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/*
 * Leitargluggi (client-search-v2). Á afgreiðslu er client.css hlaðið ásamt reception.css svo sömu stílar gildi.
 * Body hefur ljósan texta — dökkur texti inn í glugganum.
 */
#searchOverlay #searchOverlayBody {
    color: #1a1d2e;
}

#searchOverlay .client-found,
#searchOverlay .client-not-found {
    padding: 1.35rem 1.5rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #cfd4dc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#searchOverlay .client-found-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 1.1rem 0;
}

#searchOverlay .client-found-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    background: #146c43;
    color: #fff;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

#searchOverlay .client-found-header h3 {
    color: #146c43;
    margin: 0;
    font-size: 1.28rem;
    font-weight: 700;
}

#searchOverlay .client-not-found h3 {
    color: #9e1b2f;
    margin: 0 0 1rem 0;
}

#searchOverlay .client-not-found p {
    color: #1a1d2e;
}

#searchOverlay .client-info {
    margin-top: 0.65rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    #searchOverlay .client-info {
        grid-template-columns: 1fr;
    }
}

#searchOverlay .client-info p.client-info-row {
    margin: 0;
    color: #1a1d2e;
    background: #f1f3f6;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e6ed;
    line-height: 1.45;
    font-size: 0.97rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

#searchOverlay .client-info-row > strong {
    color: #0b5745;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
}

#searchOverlay .client-info-value {
    color: #1a1d2e;
    font-weight: 600;
    word-break: break-word;
    max-width: 100%;
}

#searchOverlay .client-info .status-badge {
    text-transform: none;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    align-self: flex-start;
}

#searchOverlay .client-info strong {
    color: #0b5745;
    font-weight: 700;
}

#searchOverlay .client-info .not-set {
    color: #9a3412;
    font-style: italic;
    font-weight: 600;
}

#searchOverlay .client-info-row .editable-field {
    word-break: break-word;
    max-width: 100%;
}

#searchOverlay .editable-field {
    color: #0b4f6c;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px dotted rgba(11, 79, 108, 0.55);
    padding: 0 2px 2px;
    border-radius: 2px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

#searchOverlay .editable-field:hover {
    background: #e3f2fd;
    border-bottom-style: solid;
    border-bottom-color: #0b4f6c;
}

#searchOverlay .search-actions {
    display: flex;
    gap: 12px;
    margin-top: 1.35rem;
    padding-top: 1.1rem;
    border-top: 1px solid #d8dde6;
    justify-content: flex-start;
}

#searchOverlay .search-actions .action-button.secondary {
    background-color: #3d4756;
    color: #fff;
    font-weight: 600;
    min-height: 2.75rem;
    padding: 0.5rem 1.35rem;
    border-radius: 8px;
}

#searchOverlay .search-actions .action-button.secondary:hover {
    background-color: #2b3340;
}

#searchOverlay .search-actions .action-button.danger {
    background-color: #b91c1c;
    color: #fff;
    font-weight: 600;
    min-height: 2.75rem;
    padding: 0.5rem 1.35rem;
    border-radius: 8px;
    border: 1px solid #991b1b;
}

#searchOverlay .search-actions .action-button.danger:hover {
    background-color: #991b1b;
}

#searchOverlay .multiple-clients-found > h3,
#searchOverlay .multiple-clients-found > p {
    color: #1a1d2e;
}

#searchOverlay .edit-container {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

#searchOverlay .edit-input {
    border: 1px solid #94a3b8;
    border-radius: 6px;
    color: #1a1d2e;
    background: #fff;
}

#searchOverlay .edit-save-btn {
    background-color: #198754;
    color: #fff;
    font-weight: 600;
}

#searchOverlay .edit-save-btn:hover {
    background-color: #157347;
}

#searchOverlay .edit-cancel-btn,
#searchOverlay .edit-clear-btn {
    font-weight: 600;
}

/* Lárétt skrun á mjóum skjám þegar margir dálkar */
.client-table-responsive {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.back-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    text-decoration: none;
    display: inline-block;
}

.back-button:hover {
    background-color: #5a6268;
}

.back-button.disabled {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.client-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #6c757d;
    table-layout: auto;
}

/* Tveir eða fleiri aðskildir stöðuhringir í sama reit */
.client-list-status-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    vertical-align: middle;
}

/* Undirskrift (eitt tákn) + meðferðarhópur (tvö tákn): létt aðskilnaður */
.client-list-status-group--my-clients-row {
    gap: 0.45rem;
    flex-wrap: nowrap;
    justify-content: center;
}

.client-list-status-group--my-clients-row > .client-list-status-group--signatory {
    margin-left: 0.1rem;
    padding-left: 0.4rem;
    border-left: 1px solid rgba(51, 65, 85, 0.22);
}

.client-list-status-group--my-clients-row > .client-list-status-group--treatment {
    margin-left: 0.1rem;
    padding-left: 0.4rem;
    border-left: 1px solid rgba(51, 65, 85, 0.22);
}

/* „Skjólstæðingar þínir“: aðeins litað tákn — enginn hringur/bakgrunnur */
.client-list-status-hit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    box-sizing: border-box;
    width: 1.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    min-height: 1.25rem;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    cursor: default;
}

.client-list-status-hit svg {
    display: block;
    flex-shrink: 0;
}

.client-list-status-hit--expired {
    color: #b91c1c;
}

.client-list-status-hit--revoked {
    color: #9f1239;
}

.client-list-status-hit--confirmed {
    color: #047857;
}

.client-list-status-hit--pending {
    color: #b45309;
}

/* Þjálfaralisti: í meðferð vs útskrifaður (pictogram) */
.client-list-status-hit--in-treatment {
    color: #166534;
}

.client-list-status-hit--discharged {
    color: #334155;
}

.client-list-status-hit .client-list-status-pictogram {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    object-fit: contain;
}

.client-table--variant-my-clients .col-status-my-clients {
    text-align: center;
    width: auto;
    min-width: 10.5rem;
    max-width: none;
    overflow: visible;
    vertical-align: middle;
}

.client-table--variant-my-clients .col-status-my-clients .client-list-signatory-kind-icon,
.client-table--variant-my-clients .col-status-my-clients .client-list-signatory-kind-icon .questionnaires-lucide,
.client-table--variant-my-clients .col-status-my-clients .client-list-signatory-kind-icon .questionnaires-lucide path,
.client-table--variant-my-clients .col-status-my-clients .client-list-signatory-kind-icon .questionnaires-lucide circle {
    color: #334155 !important;
    stroke: currentColor !important;
}

.client-table--variant-my-clients .col-actions {
    text-align: right;
    width: 12rem;
    min-width: 11rem;
    max-width: 16rem;
    white-space: nowrap;
    vertical-align: middle;
}

.client-list-my-clients-actions {
    display: inline-flex;
    justify-content: flex-end;
}

/* Ljós client-table: ikon úr reception.css eru hvít — dökkur litur hér */
.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn,
.client-table--variant-my-clients .client-list-my-clients-actions a.questionnaires-icon-btn:any-link {
    color: #334155 !important;
}

.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn .questionnaires-lucide,
.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn .questionnaires-lucide path,
.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn .questionnaires-lucide line,
.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn .questionnaires-lucide polyline,
.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn .questionnaires-lucide circle {
    color: #334155 !important;
    stroke: currentColor !important;
}

.client-table--variant-my-clients .client-list-my-clients-actions .questionnaires-icon-btn:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
}

.client-list-container table.client-table--variant-my-clients .signed-list-icon-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.client-list-container table.client-table--variant-my-clients .signed-list-icon-actions .signed-icon--revoke-consent .questionnaires-lucide,
.client-list-container table.client-table--variant-my-clients .signed-list-icon-actions .signed-icon--revoke-consent .questionnaires-lucide path,
.client-list-container table.client-table--variant-my-clients .signed-list-icon-actions .signed-icon--revoke-consent .questionnaires-lucide circle {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

.client-list-container table.client-table--variant-my-clients .signed-list-icon-actions .signed-icon--revoke-consent:hover {
    background-color: rgba(185, 28, 28, 0.1) !important;
}

/* Forráðamannalisti: aðgerðir sem ikon (póstur / ítrekun) */
.client-table--variant-guardian .col-actions {
    text-align: right;
    vertical-align: middle;
}

.client-list-guardian-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.client-list-container table.client-table--variant-guardian .client-list-guardian-actions .questionnaires-icon-btn,
.client-list-container table.client-table--variant-guardian .client-list-guardian-actions a.questionnaires-icon-btn:any-link {
    color: #334155 !important;
}

.client-list-container table.client-table--variant-guardian .client-list-guardian-actions .questionnaires-icon-btn .questionnaires-lucide,
.client-list-container table.client-table--variant-guardian .client-list-guardian-actions .questionnaires-icon-btn .questionnaires-lucide path,
.client-list-container table.client-table--variant-guardian .client-list-guardian-actions .questionnaires-icon-btn .questionnaires-lucide circle,
.client-list-container table.client-table--variant-guardian .client-list-guardian-actions .questionnaires-icon-btn .questionnaires-lucide rect {
    color: #334155 !important;
    stroke: currentColor !important;
}

.client-list-container table.client-table--variant-guardian .client-list-guardian-actions .questionnaires-icon-btn:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
}

/* Tegundarikon (ekki aðgerð): sama kassi og önnur questionnaires-icon-btn — barn notar einfalt „minni user“ + hártopp */
.client-list-container table.client-table--variant-guardian .client-list-signatory-kind-icon,
.client-list-container table.client-table--variant-pending .client-list-signatory-kind-icon,
.client-list-container table.client-table--variant-my-clients .client-list-signatory-kind-icon,
.client-list-container table.client-table--variant-my-clients .col-status-my-clients .client-list-signatory-kind-icon {
    cursor: help;
    pointer-events: auto;
}

.client-list-container table.client-table--variant-guardian .client-list-signatory-kind-icon:hover,
.client-list-container table.client-table--variant-pending .client-list-signatory-kind-icon:hover,
.client-list-container table.client-table--variant-my-clients .client-list-signatory-kind-icon:hover,
.client-list-container table.client-table--variant-my-clients .col-status-my-clients .client-list-signatory-kind-icon:hover {
    background-color: rgba(15, 23, 42, 0.05) !important;
}

.client-list-container table.client-table--variant-guardian .client-list-icon-resend--active {
    background-color: rgba(13, 138, 153, 0.22) !important;
    border-radius: 8px;
}

.client-list-container table.client-table--variant-guardian .client-list-icon-resend--active:hover {
    background-color: rgba(13, 138, 153, 0.32) !important;
}

/* Biðlisti: ítrekun sem ikon (umslag / bjalla+klukka) */
.client-table--variant-pending .col-actions {
    text-align: right;
    vertical-align: middle;
}

.client-list-resend-actions,
.client-list-pending-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.client-list-icon-reminder-sent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    pointer-events: none;
}

.client-list-email-placeholder.muted {
    color: rgba(148, 163, 184, 0.95);
    font-size: 0.92em;
}

.client-list-container table.client-table--variant-pending .client-list-resend-actions .questionnaires-icon-btn,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .questionnaires-icon-btn {
    color: #334155 !important;
}

.client-list-container table.client-table--variant-pending .client-list-resend-actions .questionnaires-icon-btn .questionnaires-lucide,
.client-list-container table.client-table--variant-pending .client-list-resend-actions .questionnaires-icon-btn .questionnaires-lucide path,
.client-list-container table.client-table--variant-pending .client-list-resend-actions .questionnaires-icon-btn .questionnaires-lucide circle,
.client-list-container table.client-table--variant-pending .client-list-resend-actions .questionnaires-icon-btn .questionnaires-lucide rect,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .questionnaires-icon-btn .questionnaires-lucide,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .questionnaires-icon-btn .questionnaires-lucide path,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .questionnaires-icon-btn .questionnaires-lucide circle,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .questionnaires-icon-btn .questionnaires-lucide rect {
    color: #334155 !important;
    stroke: currentColor !important;
}

.client-list-container table.client-table--variant-pending .client-list-resend-actions .questionnaires-icon-btn:hover,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .questionnaires-icon-btn:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
}

.client-list-container table.client-table--variant-pending .client-list-pending-actions .signed-icon--super-admin-delete .questionnaires-lucide,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .signed-icon--super-admin-delete .questionnaires-lucide path,
.client-list-container table.client-table--variant-pending .client-list-pending-actions .signed-icon--super-admin-delete .questionnaires-lucide line {
    color: #b91c1c !important;
    stroke: currentColor !important;
}

.client-list-container table.client-table--variant-pending .client-list-pending-actions .signed-icon--super-admin-delete:hover {
    background-color: rgba(185, 28, 28, 0.1) !important;
}

.client-list-container table.client-table--variant-pending .client-list-icon-resend--active {
    background-color: rgba(13, 138, 153, 0.22) !important;
    border-radius: 8px;
}

.client-list-container table.client-table--variant-pending .client-list-icon-resend--active:hover {
    background-color: rgba(13, 138, 153, 0.32) !important;
}

/* Síulína + síðun (client-list-table-ui.js) — client-table og staff-users-table (umsjón) */
.client-table thead tr.client-table-filter-row th,
.staff-users-table thead tr.client-table-filter-row th {
    padding: 8px 10px;
    vertical-align: middle;
    background-color: rgba(43, 45, 66, 0.06);
    border-right: 1px solid #6c757d;
}

.client-table thead tr.client-table-filter-row th:last-child,
.staff-users-table thead tr.client-table-filter-row th:last-child {
    border-right: none;
}

.client-table-filter-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.9em;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #1a1d2e;
}

.client-table-filter-input::placeholder {
    color: #64748b;
}

.client-table-filter-input:focus {
    outline: 2px solid rgba(11, 79, 108, 0.35);
    outline-offset: 1px;
    border-color: #0b4f6c;
}

.client-table tbody tr.client-table-row--suppressed,
.staff-users-table tbody tr.client-table-row--suppressed {
    display: none !important;
}

.client-table tbody tr.client-table-row--stripe td,
.staff-users-table tbody tr.client-table-row--stripe td {
    background-color: #eef3f8;
}

.client-table tbody tr.client-table-row--stripe:hover td,
.staff-users-table tbody tr.client-table-row--stripe:hover td {
    background-color: #e3eaf2;
}

.client-table-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(108, 117, 125, 0.45);
    background: rgba(255, 255, 255, 0.92);
    box-sizing: border-box;
}

.client-table-list-toolbar__nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.client-table-list-toolbar__status {
    font-size: 0.92em;
    font-weight: 600;
    color: #334155;
    padding: 0 8px;
    min-width: 12rem;
    text-align: center;
}

.client-table-list-toolbar__btn {
    padding: 6px 10px;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
}

.client-table-list-toolbar__btn:hover:not(:disabled) {
    background: #f1f5f9;
}

.client-table-list-toolbar__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.client-table-list-toolbar__page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92em;
    font-weight: 600;
    color: #334155;
}

.client-table-list-toolbar__page-size-label {
    white-space: nowrap;
}

.client-table-list-toolbar__select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #94a3b8;
    background: #fff;
    color: #1a1d2e;
    font-size: 0.92em;
    min-width: 5rem;
}

html[data-theme="dark"] .client-table-list-toolbar,
html:not([data-theme]) .client-table-list-toolbar {
    background: rgba(30, 34, 48, 0.92);
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .client-table-list-toolbar__status,
html:not([data-theme]) .client-table-list-toolbar__status,
html[data-theme="dark"] .client-table-list-toolbar__page-size,
html:not([data-theme]) .client-table-list-toolbar__page-size {
    color: #e2e8f0;
}

html[data-theme="dark"] .client-table-list-toolbar__btn,
html:not([data-theme]) .client-table-list-toolbar__btn {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.4);
    color: #f1f5f9;
}

html[data-theme="dark"] .client-table-list-toolbar__select,
html:not([data-theme]) .client-table-list-toolbar__select {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.45);
    color: #f1f5f9;
}

html[data-theme="dark"] .client-table thead tr.client-table-filter-row th,
html:not([data-theme]) .client-table thead tr.client-table-filter-row th,
html[data-theme="dark"] .staff-users-table thead tr.client-table-filter-row th,
html:not([data-theme]) .staff-users-table thead tr.client-table-filter-row th {
    background-color: #f8fafc;
}

html[data-theme="dark"] .client-table-filter-input,
html:not([data-theme]) .client-table-filter-input {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

html[data-theme="dark"] .client-table tbody tr.client-table-row--stripe td,
html:not([data-theme]) .client-table tbody tr.client-table-row--stripe td,
html[data-theme="dark"] .staff-users-table tbody tr.client-table-row--stripe td,
html:not([data-theme]) .staff-users-table tbody tr.client-table-row--stripe td {
    background-color: #eef3f8;
}

html[data-theme="dark"] .client-table tbody tr.client-table-row--stripe:hover td,
html:not([data-theme]) .client-table tbody tr.client-table-row--stripe:hover td,
html[data-theme="dark"] .staff-users-table tbody tr.client-table-row--stripe:hover td,
html:not([data-theme]) .staff-users-table tbody tr.client-table-row--stripe:hover td {
    background-color: #e3eaf2;
}

html[data-theme="light"] .client-table tbody tr.client-table-row--stripe td,
html[data-theme="light"] .staff-users-table tbody tr.client-table-row--stripe td {
    background-color: #eef3f8;
}

.client-table th {
    background-color: #2b2d42;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid #6c757d;
}

.client-table th:last-child {
    border-right: none;
}

.client-table td {
    padding: 11px 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #6c757d;
    color: #333333;
    line-height: 1.22;
}

.client-table td:last-child {
    border-right: none;
}

/* Forráðamannsnetfang í töflu: ekki 450px lágmarksbreidd úr styles.css */
.client-table td:has(.guardian-email-edit-container) {
    vertical-align: top;
    min-width: 0;
}

.client-table .guardian-email-edit-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.client-table .guardian-email-input-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.client-table input.guardian-email-input[type="email"] {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 100%;
    width: 100%;
}

.client-table .guardian-email-lang-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.client-table .guardian-email-lang-label {
    font-size: 13px;
}

.client-table .guardian-email-lang-row .correspondence-lang-select {
    min-width: 0;
    max-width: 100%;
}

.client-table tr:hover td {
    background-color: #e9eff6;
}

.client-table tbody tr.client-table__row-selectable {
    cursor: pointer;
}

.client-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-child {
    background-color: #cce5ff;
    color: #004085;
}

.status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.status-revoked {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Table sorting styles */
/* Sortable column header styles */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
    padding-right: 20px !important;
}

.sortable:hover {
    background-color: #495057 !important;
}

.sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #007bff;
    font-weight: bold;
    display: none;
}

.sortable:hover .sort-arrow {
    display: inline;
    color: #ffffff;
}

.sortable.active .sort-arrow {
    display: inline;
    color: #007bff;
}

th {
    position: relative;
    user-select: none;
}

/* Missing email section styles */
.missing-email-section {
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    margin: 5px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.missing-email-text {
    margin: 0;
    color: #856404;
    font-weight: 500;
    font-size: 0.9em;
}

/*
 * Skjáástæðir fyrir skjólstæðingatöflu:
 * - Stórir skjáir: table-layout fixed, nafn fær breidd og má vera á einni línu; kennitala í einni línu.
 * - Þrengri: auto layout, nafn má flæða; undir ~900px lárétt skrun í .client-table-responsive.
 */
.client-table th {
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
    line-height: 1.22;
    text-align: center;
}

@media (min-width: 1201px) {
    .client-table {
        table-layout: fixed;
    }

    /* Ekki undirrituð yfirlit: minni nafndálkur svo lengri textar fái pláss */
    .client-table:not(.client-table-signed) th:first-child,
    .client-table:not(.client-table-signed) td:first-child {
        width: 18%;
        min-width: 8.5rem;
        max-width: 15rem;
    }

    .client-table:not(.client-table-signed) td:first-child {
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .client-table.client-table-signed th:first-child,
    .client-table.client-table-signed td:first-child {
        width: 22%;
        min-width: 9rem;
        max-width: 13rem;
    }

    .client-table th:nth-child(2),
    .client-table td:nth-child(2) {
        width: 10.5rem;
        max-width: 12rem;
        white-space: nowrap;
    }

    /* „Skjólstæðingar þínir“: Staða (3. dálkur) þarf pláss fyrir undirskrift + 2× meðferð — annars klippist tákn í fixed layout */
    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(3),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(3) {
        width: 12rem;
        min-width: 11rem;
        max-width: 16rem;
        overflow: visible;
        white-space: normal;
    }

    .client-table--variant-pending .col-email-signer,
    .client-table--variant-guardian .col-email-signer {
        min-width: 10.5rem;
    }

    .client-table--variant-guardian .col-guardian-name {
        min-width: 10rem;
    }

    .client-table--variant-guardian .col-signature-date,
    .client-table.client-table-signed .col-signature-date,
    .client-table.client-table-signed .col-signed-summary {
        min-width: 9rem;
    }

    /* „Hafa skrifað undir“: sameinaður staða-dálkur + aðgerðir með ikonum */
    .client-table.client-table-signed th:nth-child(3),
    .client-table.client-table-signed td:nth-child(3) {
        width: 18%;
        min-width: 9rem;
    }

    .client-table.client-table-signed th:nth-child(4),
    .client-table.client-table-signed td:nth-child(4) {
        width: auto;
        min-width: 7.5rem;
        max-width: 11rem;
        white-space: nowrap;
    }
}

/* responsive design – þrengri skjáir */
@media (max-width: 1200px) {
    .client-table {
        font-size: 0.95em;
        border: 1px solid #6c757d;
        table-layout: auto;
    }

    .client-table td:first-child,
    .client-table th:first-child {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        width: auto;
        min-width: 8rem;
    }

    .client-table th:nth-child(2),
    .client-table td:nth-child(2) {
        white-space: normal;
        width: auto;
        max-width: none;
    }

    .client-table th {
        padding: 10px 22px 10px 10px !important;
        font-size: 0.9em;
        line-height: 1.3;
        border-right: 1px solid #6c757d;
    }

    .client-table th:last-child {
        border-right: none;
    }

    .client-table td {
        padding: 7px 9px;
        font-size: 0.9em;
        border-right: 1px solid #6c757d;
    }

    .client-table td:last-child {
        border-right: none;
    }
}

@media (max-width: 992px) {
    .client-table {
        font-size: 0.9em;
    }

    .client-table th {
        padding: 8px 20px 8px 8px !important;
        font-size: 0.85em;
        line-height: 1.3;
        border-right: 1px solid #6c757d;
    }

    .client-table th:last-child {
        border-right: none;
    }

    .client-table td {
        padding: 6px 8px;
        font-size: 0.85em;
        border-right: 1px solid #6c757d;
    }

    .client-table td:last-child {
        border-right: none;
    }
}

@media (max-width: 900px) {
    .client-table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -8px;
        margin-right: -8px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .client-table-responsive .client-table {
        min-width: 720px;
    }
}

@media (max-width: 768px) {
    .client-list-container {
        padding: 12px;
    }

    .client-table {
        font-size: 0.85em;
    }

    .client-table th {
        padding: 7px 18px 7px 7px !important;
        font-size: 0.8em;
        line-height: 1.2;
        border-right: 1px solid #6c757d;
    }

    .client-table th:last-child {
        border-right: none;
    }

    .client-table td {
        padding: 5px 7px;
        font-size: 0.8em;
        border-right: 1px solid #6c757d;
    }

    .client-table td:last-child {
        border-right: none;
    }
}

@media (max-width: 660px) {
    .client-table {
        font-size: 0.8em;
    }

    .client-table th {
        padding: 6px 16px 6px 6px !important;
        font-size: 0.75em;
        line-height: 1.2;
        border-right: 1px solid #6c757d;
    }

    .client-table th:last-child {
        border-right: none;
    }

    .client-table td {
        padding: 4px 6px;
        font-size: 0.75em;
        border-right: 1px solid #6c757d;
    }

    .client-table td:last-child {
        border-right: none;
    }

    .client-table-responsive .client-table {
        min-width: 640px;
    }
}

/* Fela dálka eftir skjábreidd (reitir eru áfram í DOM – röðun eftir data-column kemst fyrir) */
@media (max-width: 1120px) {
    .client-table--variant-guardian .col-signature-date {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .client-table--variant-guardian .col-guardian-name {
        display: none !important;
    }

    .client-table--variant-pending .col-email-signer,
    .client-table--variant-guardian .col-email-signer {
        display: none !important;
    }
}

@media (max-width: 520px) {
    .client-table--variant-all .col-client-email {
        display: none !important;
    }
}

.no-clients {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

.client-list-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.client-list-header-row .client-count {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}

a.client-list-new-client-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    background-color: #198754;
    color: #fff;
    border: 1px solid #157347;
    box-sizing: border-box;
}

a.client-list-new-client-btn:hover {
    background-color: #157347;
    color: #fff;
}

.client-count {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #495057;
}

.action-btn {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
}

.discharge-btn {
    background-color: #28a745;
    color: white;
}

.discharge-btn:hover {
    background-color: #218838;
}

.revoke-btn {
    background-color: #dc3545;
    color: white;
}

.revoke-btn:hover {
    background-color: #c82333;
}

.revoke-discharge-btn {
    background-color: #ffc107;
    color: #212529;
}

.revoke-discharge-btn:hover {
    background-color: #e0a800;
}

.resend-btn {
    background-color: #17a2b8;
    color: white;
}

.edit-btn {
    background-color: #6c757d; /* Gray */
    color: white;
}

.resend-btn:hover {
    background-color: #138496;
}

.resend-btn--reminder-active {
    background-color: #0d8a99;
}

.edit-btn:hover {
    background-color: #5a6268;
}

/* Alert OK button styles */
.alert-ok-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.alert-ok-button:hover {
    background-color: #5a6268;
}

.error-ok-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.error-ok-button:hover {
    background-color: #c82333;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Nýskráning skjólstæðings: jafn rammalína og skrun — .efni 90% nær út fyrir innramma á „hálfum“ skjá */
main.efni.efni--new-client {
    width: 100%;
    max-width: min(52rem, calc(100vw - 1.5rem));
    margin-left: auto;
    margin-right: auto;
    padding: clamp(12px, 2vw, 22px);
    box-sizing: border-box;
    min-width: 0;
    overflow-x: clip;
}

/* Breiðara en áður (t.d. Firefox); bulk er í sér .client-bulk-fullwidth */
main.efni.efni--new-client .form-container:not(.client-bulk-fullwidth) {
    width: 100%;
    max-width: 100%;
    padding-left: clamp(8px, 2vw, 20px);
    padding-right: clamp(8px, 2vw, 20px);
    box-sizing: border-box;
}

/* styles.css .form: flex row + justify-content center — fieldset minnkar við innihald; látum kassann fylla breidd */
main.efni.efni--new-client .form-container form.form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
}

/* Chrome/Edge: fieldset sem flex-barn reiknar oft innri breidd (min-content) — þvingum að fylla form */
main.efni.efni--new-client .form-container form.form > fieldset.new-client-form {
    flex: 1 1 auto;
    align-self: stretch;
    min-inline-size: 0;
    max-width: none;
}

/* Nýskráning: breiðari kassi á stórum skjám, þrengri á minni */
@media (min-width: 640px) {
    main.efni.efni--new-client .form-container:not(.client-bulk-fullwidth) {
        max-width: min(42rem, 100%);
    }
}

@media (min-width: 900px) {
    main.efni.efni--new-client .form-container:not(.client-bulk-fullwidth) {
        max-width: min(48rem, 100%);
    }
}

@media (min-width: 1200px) {
    main.efni.efni--new-client {
        max-width: min(58rem, calc(100vw - 1.5rem));
    }

    main.efni.efni--new-client .form-container:not(.client-bulk-fullwidth) {
        max-width: min(54rem, 100%);
    }
}

@media (max-width: 1100px) {
    main.efni.efni--new-client {
        max-width: calc(100vw - 1.25rem);
        padding: 14px 12px;
    }
}

@media (max-width: 720px) {
    main.efni.efni--new-client {
        max-width: 100%;
        padding: 12px 10px;
        border-radius: 6px;
    }

    main.efni.efni--new-client .form-container {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/*
 * Nýskráning skjólstæðings: sama breidd, rammalína, bakgrunnur og letur
 * (yfirskrifar almenna .in-form / styles.css m.a. min-width á input).
 */
.new-client-form {
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 8px;
    padding: 1rem 1.1rem 1.2rem;
    margin: 0;
    /* Grid í stað flex: jafnari í Chrome þegar um fieldset er að ræða (flex + fieldset = buggy) */
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    /* Bil milli stóra blokkanna: in-form → tungumál → hnappar */
    gap: 12px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

html[data-theme="dark"] main.efni.efni--new-client fieldset.new-client-form,
html:not([data-theme]) main.efni.efni--new-client fieldset.new-client-form {
    border-color: rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form {
    border-color: rgba(15, 23, 42, 0.14);
    background: #ffffff;
}

html[data-theme="dark"] main.efni.efni--new-client fieldset.new-client-form > legend,
html:not([data-theme]) main.efni.efni--new-client fieldset.new-client-form > legend {
    color: #f1f5f9;
    padding: 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form > legend {
    color: #0f172a;
    padding: 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.new-client-form .in-form,
.new-client-form .correspondence-language-block {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.new-client-form .in-form {
    display: flex;
    flex-direction: column;
    /* Jafnt bil milli merkja, reita og athugasemda innan skráningar */
    gap: 8px;
    margin-bottom: 0;
}

/* .form-group í client.css hefur 25px margin — jafna innan skráningarforms */
.new-client-form .in-form .form-group {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tungumál: sama bil og .in-form (fieldset gap + þetta gap) */
.new-client-form .form-group.correspondence-language-block {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    flex: 1 1 auto;
}

/* reception.css .form-group label — yfirskrifa fyrir merki og bil */
main.efni.efni--new-client .new-client-form .form-group.correspondence-language-block label {
    margin-bottom: 0;
}

.new-client-form input[type="text"],
.new-client-form input[type="email"],
.new-client-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 1rem;
    line-height: 1.35;
    min-height: 2.75rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #fff;
    color: #1a1d2e;
}

/* textarea í sama formi (ef einhverja tíma notað) */
.new-client-form textarea {
    border-radius: 6px;
    box-sizing: border-box;
}

.new-client-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-color: #fff;
    padding-right: 2rem;
}

.new-client-form select:disabled {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Vafrar sem bæta við „native“ hornum á select */
.new-client-form select::-ms-expand {
    display: none;
}

/* Merki: jöfn leturgerð, reception.css .form-group label yfirskrifuð */
main.efni.efni--new-client .new-client-form .in-form > label[for],
main.efni.efni--new-client .new-client-form .correspondence-language-block label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.new-client-form input:disabled,
.new-client-form select:disabled {
    opacity: 1;
    cursor: not-allowed;
    border-style: solid;
    border-color: #cbd5e1;
    background-color: #f8fafc;
    color: #64748b;
}

html[data-theme="dark"] main.efni.efni--new-client .new-client-form input[type="text"]:disabled,
html[data-theme="dark"] main.efni.efni--new-client .new-client-form input[type="email"]:disabled,
html:not([data-theme]) main.efni.efni--new-client .new-client-form input[type="text"]:disabled,
html:not([data-theme]) main.efni.efni--new-client .new-client-form input[type="email"]:disabled,
html[data-theme="dark"] main.efni.efni--new-client .new-client-form select:disabled,
html:not([data-theme]) main.efni.efni--new-client .new-client-form select:disabled {
    /* Sama ljós grunnflöt og virkir reitir — aðeins letur og ramma mismunur */
    background-color: #f8fafc;
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.55);
    opacity: 1;
}

html[data-theme="dark"] main.efni.efni--new-client .new-client-form input[type="text"],
html[data-theme="dark"] main.efni.efni--new-client .new-client-form input[type="email"],
html:not([data-theme]) main.efni.efni--new-client .new-client-form input[type="text"],
html:not([data-theme]) main.efni.efni--new-client .new-client-form input[type="email"],
html[data-theme="dark"] main.efni.efni--new-client .new-client-form select:enabled,
html:not([data-theme]) main.efni.efni--new-client .new-client-form select:enabled {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.5);
}

html[data-theme="light"] main.efni.efni--new-client .new-client-form input[type="text"],
html[data-theme="light"] main.efni.efni--new-client .new-client-form input[type="email"],
html[data-theme="light"] main.efni.efni--new-client .new-client-form select:enabled {
    background-color: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
}

/*
 * Merki og valkostir: sjálfgefið ljós letur á dökkum kassa (virkar líka þegar data-theme vantar
 * eða tómt — eldri dark/:not([data-theme]) skilyrði náðu ekki alltaf yfir á „globale“ .radio-label).
 */
main.efni.efni--new-client fieldset.new-client-form .radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

main.efni.efni--new-client fieldset.new-client-form .question-label {
    margin-bottom: 15px;
}

main.efni.efni--new-client fieldset.new-client-form .in-form > label[for],
main.efni.efni--new-client fieldset.new-client-form .correspondence-language-block label,
main.efni.efni--new-client fieldset.new-client-form .question-label {
    color: #e8eef7;
}

main.efni.efni--new-client fieldset.new-client-form .radio-label {
    display: flex;
    align-items: center;
    border-width: 1px;
    border-style: solid;
    border-radius: 6px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    border-color: rgba(148, 163, 184, 0.45);
    background-color: rgba(15, 23, 42, 0.35);
    color: #e8eef7;
}

main.efni.efni--new-client fieldset.new-client-form .radio-label input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

main.efni.efni--new-client fieldset.new-client-form .radio-label:hover {
    border-color: #06d6a0;
    background-color: rgba(6, 214, 160, 0.12);
}

main.efni.efni--new-client fieldset.new-client-form .radio-label:has(input[type="radio"]:checked) {
    border-color: #06d6a0;
    background-color: rgba(6, 214, 160, 0.18);
}

main.efni.efni--new-client fieldset.new-client-form .checkbox-row .checkbox-inline {
    color: #cbd5e1;
}

main.efni.efni--new-client fieldset.new-client-form .form-hint.subtle {
    color: #cbd5e1;
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .in-form > label[for],
html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .correspondence-language-block label,
html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .question-label {
    color: #0f172a;
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .radio-label {
    border-color: #cbd5e1;
    background-color: #fff;
    color: #0f172a;
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .radio-label:hover {
    border-color: #06d6a0;
    background-color: rgba(6, 214, 160, 0.08);
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .radio-label:has(input[type="radio"]:checked) {
    border-color: #06d6a0;
    background-color: rgba(6, 214, 160, 0.12);
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .checkbox-row .checkbox-inline {
    color: #475569;
}

html[data-theme="light"] main.efni.efni--new-client fieldset.new-client-form .form-hint.subtle {
    color: #64748b;
}

.new-client-form .in-form .checkbox-row {
    margin-top: 2px;
    margin-bottom: 8px;
}

.new-client-form .new-client-actions {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
    justify-content: stretch;
    flex-wrap: nowrap;
    margin-top: 0;
}

.new-client-form .new-client-actions input[type="submit"].action-button,
.new-client-form .new-client-actions #clearFormBtn.action-button {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
}

@media (max-width: 420px) {
    .new-client-form .new-client-actions {
        flex-wrap: wrap;
    }
}

/* Responsive hönnun fyrir informed-consent */
@media (max-width: 768px) {
    .form-container {
        padding: 10px;
    }
    
    h1, h2, h3 {
        font-size: 1.2em;
    }
    
    p, li {
        font-size: 0.9em;
        line-height: 1.4;
    }
}


/* Undirskrift hluti */
.signature-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.signature-container {
    margin-top: 15px;
}

.signature-canvas {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background-color: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
    height: 150px;
    touch-action: none; /* Koma í veg fyrir scroll á snertiskjáa */
}

.signature-controls {
    text-align: center;
    margin-top: 15px;
}

.clear-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #c82333;
}

/* Responsive fyrir snertiskjáa */
@media (max-width: 768px) {
    .signature-canvas {
        height: 135px;
        max-width: 100%;
    }
    
    .signature-buttons {
        flex-direction: column;
    }
    
    .signature-method-btn {
        padding: 15px;
        font-size: 1.1em;
    }
}

/* Fyrir stærri skjái */
@media (min-width: 769px) {
    .signature-canvas {
        height: 150px;
    }
}

/* Radio button styles */
.form-group {
    margin: 25px 0;
}

.form-group.inline-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
    margin-top: 0;
}

.form-group.inline-checkbox > label:first-child {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    cursor: pointer;
    flex: 0 0 auto;
    white-space: nowrap;
}

.checkbox-inline input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

/* .question-label / .radio-group / .radio-label — eingöngu í new-client; sjá main.efni--new-client fieldset.new-client-form að ofan */

#representativeEmailSection {
    margin-top: 20px;
}

#representativeEmailSection label {
    display: block;
    margin-bottom: 8px;
    margin-top: 20px;
}

#representativeEmailSection label:first-child {
    margin-top: 0;
}

#representativeEmailSection label[for="representativeEmail"] {
    margin-top: 20px;
}

.checkbox-row {
    display: flex;
    justify-content: flex-start;
    /* width: fit-content; */
    clear: both;
    padding: 0;
    align-items: flex-start;
    margin: 4px 0 15px;
}

/* Yfirskrifa gap frá .in-form fyrir checkbox-row */
.in-form .checkbox-row {
    margin: 4px 0 15px;
    padding-left: 10px; /* Jafna við input field padding */
    box-sizing: border-box;
    width: fit-content;
}

/* Yfirskrifa gap frá .in-form fyrir email input + checkbox */
.in-form input[type="email"] + .checkbox-row {
    margin-top: 4px;
    margin-bottom: 15px;
    padding-left: 10px; /* Jafna við input field padding */
    margin-left: 0;
    box-sizing: border-box;
    width: fit-content;
}

/* Checkbox-row nota grunnregluna - engar sértækar reglur nauðsynlegar */

/* Allar checkbox-inline element nota grunnregluna - engar sértækar reglur nauðsynlegar */

/* Jafna checkbox-inline við input field - nota grunnregluna */
.in-form input[type="email"] + .checkbox-row .checkbox-inline {
    margin-left: 0;
    /* padding-left: 10px er í grunnreglunni */
    /* gap: 3px er í grunnreglunni */
}

.checkbox-row .checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9em;
    color: #999;
    font-weight: normal;
    padding-left: 10px;
    /* width: fit-content;
    max-width: fit-content;*/
}

.checkbox-row .checkbox-inline input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.email-label-row .checkbox-inline input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

/* RepresentativeEmailSection: bara texta- og email-reitir 100% */
#representativeEmailSection input[type="text"],
#representativeEmailSection input[type="email"] {
    width: 100%;
    margin-bottom: 0;
}

/* Tryggja að checkbox-row sé rétt staðsett eftir email input */
input[type="email"] + .checkbox-row {
    margin: 4px 0 15px;
    padding-left: 10px; /* Jafna við input field padding */
    box-sizing: border-box;
    width: fit-content;
}

#childSection {
    margin-top: 20px;
}

#childSection label {
    display: block;
    margin-bottom: 8px;
    margin-top: 20px;
}

#childSection label:first-child {
    margin-top: 0;
}

/* ChildSection: bara texta- og email-reitir eiga að vera 100% */
#childSection input[type="text"],
#childSection input[type="email"] {
    width: 100%;
    margin-bottom: 0;
}

/* Hidden sections */
.hidden-section {
    display: none !important;
}

/* Validation messages */
#ssnValidationMessages {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Engin aukarými þegar engin skilaboð — minnkar bil milli kennitölu og nafns */
#ssnValidationMessages:empty {
    display: none;
    margin: 0;
}

.new-client-form [id$="ValidationMessages"]:empty {
    display: none;
    margin: 0;
}

.new-client-form #ssnValidationMessages:not(:empty) {
    margin-top: 4px;
    margin-bottom: 4px;
}

.validation-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.validation-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.validation-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Email validation error styling */
input[type="email"].email-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

input[type="email"].email-error:focus {
    border-color: #dc3545;
    outline-color: #dc3545;
}

/* Disabled input styling */
input:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Disabled submit button styling */
input[type="submit"]:disabled,
.action-button:disabled {
    background-color: #6c757d;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

input[type="submit"]:disabled:hover,
.action-button:disabled:hover {
    background-color: #6c757d;
}

/* New client form button styles */
.new-client-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-start;
}

/* Nýskrá button - grænn lit eins og Staðfesta hnappurinn */
.new-client-actions input[type="submit"].action-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    min-width: 200px;
    transition: background-color 0.3s;
}

.new-client-actions input[type="submit"].action-button:hover:not(:disabled) {
    background-color: #218838;
}

.new-client-actions input[type="submit"].action-button:disabled {
    background-color: #6c757d;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.new-client-actions input[type="submit"].action-button:disabled:hover {
    background-color: #6c757d;
}

/* Hreinsa button - rauður lit eins og Hætta við hnappurinn */
.new-client-actions #clearFormBtn.action-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    min-width: 200px;
    transition: background-color 0.3s;
}

.new-client-actions #clearFormBtn.action-button:hover {
    background-color: #c82333;
}

/* Inline form styles */
.inline-form {
    display: inline;
}

/* Signature image border */
.signature-image {
    border: 1px solid #ccc;
    max-width: 100%;
}

/* Secondary button style */
.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Form margin top */
.form-margin-top {
    margin-top: 30px;
}

/* Search box styles */
.search-box-flex {
    width: 80%;
}

.search-input-flex {
    flex: 1;
    min-width: 0;
}

.search-button-flex {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Allir "Skrá netfang seinna" checkboxar eiga að vera bara kassinn sjálfur */
#clientEmailSection .checkbox-inline input[type="checkbox"],
#representativeEmailSection .checkbox-inline input[type="checkbox"],
#childSection .checkbox-inline input[type="checkbox"] {
    width: auto !important;
    flex: 0 0 auto !important;  /* kemur í veg fyrir að checkbox fylli flex-rými */
}

/*
 * „Skjólstæðingar sem hafa skrifað undir“: vinstri nafn; miðja í öllum öðrum dálkum (haus og gögn).
 * Staða: inline-block kassi, miðjaður í reit — ekki klippt eða þrýstur af of mjóum dálk.
 */
table.client-table.client-table-signed > thead > tr > th:first-child,
table.client-table.client-table-signed > tbody > tr > td:first-child,
.client-list-container table.client-table.client-table-signed > thead > tr > th:first-child,
.client-list-container table.client-table.client-table-signed > tbody > tr > td:first-child {
    text-align: left !important;
}

table.client-table.client-table-signed > thead > tr > th:not(:first-child),
table.client-table.client-table-signed > tbody > tr > td:not(:first-child),
.client-list-container table.client-table.client-table-signed > thead > tr > th:not(:first-child),
.client-list-container table.client-table.client-table-signed > tbody > tr > td:not(:first-child) {
    text-align: center !important;
    vertical-align: middle !important;
}

table.client-table.client-table-signed > tbody > tr > td .status-badge,
.client-list-container table.client-table.client-table-signed > tbody > tr > td .status-badge {
    display: inline-block !important;
    max-width: 100% !important;
    min-width: 10.5rem;
    margin: 0 auto !important;
    padding: 0.6rem 1rem !important;
    border-radius: 6px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
    font-size: 0.82em !important;
    text-transform: uppercase !important;
}

/* Staða: UNDIRRITAÐ + dagsetning í tveimur línunum */
.status-badge.status-signed-stacked {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-width: 8.5rem;
    text-transform: none !important;
}

.status-signed-stacked .status-signed-title {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-signed-stacked .status-signed-date {
    font-weight: 600;
    font-size: 0.88em;
    text-transform: none;
    opacity: 0.95;
}

table.client-table.client-table-signed thead th.th-signed-nowrap,
.client-list-container table.client-table.client-table-signed thead th.th-signed-nowrap {
    white-space: nowrap;
}

table.client-table.client-table-signed .col-signed-name,
.client-list-container table.client-table.client-table-signed .col-signed-name {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

table.client-table.client-table-signed .action-btn,
.client-list-container table.client-table.client-table-signed .action-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
}

a.signed-more-link.action-btn {
    text-decoration: none;
    display: inline-block;
    background-color: #5a6268;
    color: #fff !important;
}
a.signed-more-link.action-btn:hover {
    background-color: #4b5258;
    color: #fff !important;
}

table.client-table.client-table-signed .col-signed-summary .col-signed-summary-date,
.client-list-container table.client-table.client-table-signed .col-signed-summary .col-signed-summary-date {
    font-weight: 600;
    font-size: 0.95em;
}

.client-list-container table.client-table.client-table-signed .signed-list-icon-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    margin: 0 auto;
}

.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions a.questionnaires-icon-btn:any-link {
    color: #334155 !important;
}

.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn .questionnaires-lucide,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn .questionnaires-lucide path,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn .questionnaires-lucide line,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn .questionnaires-lucide polyline,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn .questionnaires-lucide circle,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn .questionnaires-lucide rect {
    color: #334155 !important;
    stroke: #334155 !important;
}

.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn:hover {
    background-color: rgba(15, 23, 42, 0.08) !important;
}

.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .signed-icon--revoke-consent .questionnaires-lucide,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .signed-icon--revoke-consent .questionnaires-lucide path,
.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .signed-icon--revoke-consent .questionnaires-lucide circle {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

.client-list-container table.client-table.client-table-signed .signed-list-icon-actions .signed-icon--revoke-consent:hover {
    background-color: rgba(185, 28, 28, 0.1) !important;
}

html[data-theme="light"] .client-list-container table.client-table.client-table-signed .signed-list-icon-actions .questionnaires-icon-btn,
html[data-theme="light"] .client-list-container table.client-table.client-table-signed .signed-list-icon-actions a.questionnaires-icon-btn:any-link {
    color: #334155 !important;
}

.signed-client-more-container {
    max-width: 40rem;
}

.signed-client-more-card {
    background: #fff;
    color: #0f172a;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.signed-client-more-meta {
    margin: 0 0 0.75rem 0;
    font-size: 1.05rem;
}

.signed-client-more-meta strong {
    color: #0f172a;
    font-weight: 700;
}

.signed-client-more-hint {
    color: #555;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.signed-client-active-consent {
    margin: 0 0 1.25rem 0;
    padding: 0 0 1.1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.signed-client-active-fallback {
    border-bottom: none;
    padding-bottom: 0;
}

.signed-client-active-heading {
    margin: 0 0 0.35rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.signed-client-active-intro {
    margin: 0 0 0.75rem 0;
}

.signed-client-consent-dl {
    margin: 0 0 1rem 0;
    padding: 0;
}

.signed-client-consent-dl-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 11rem) 1fr;
    gap: 0.35rem 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
    align-items: baseline;
}

.signed-client-consent-dl-row:last-of-type {
    border-bottom: none;
}

.signed-client-consent-dl dt {
    margin: 0;
    font-weight: 600;
    color: #475569;
}

.signed-client-consent-dl dd {
    margin: 0;
    color: #0f172a;
}

.signed-client-active-actions {
    margin-bottom: 0;
}

a.signed-client-open-pdf-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.signed-client-pdf-archive {
    margin: 1rem 0 1.25rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.signed-client-archive-heading {
    margin: 0 0 0.35rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.signed-client-archive-intro {
    margin: 0 0 0.6rem 0;
}

.consent-pdf-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.consent-pdf-archive-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.consent-pdf-archive-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: #475569;
}

.consent-pdf-archive-link {
    font-weight: 600;
    color: #0f766e;
    text-decoration: underline;
}

.signed-client-more-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.signed-client-more-row2 {
    margin-bottom: 0;
}

/* Aðgerðir á hvítu spjaldi: greinilegir „Prenta“ / „Senda“ hnappar */
.signed-client-more-card .secondary-btn {
    background: #e2e8f0;
    color: #0f172a;
    border: 1px solid #94a3b8;
}
.signed-client-more-card .secondary-btn:hover {
    background: #cbd5e1;
    border-color: #64748b;
}

.signed-actions-cell {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.signed-pdf-dropdown {
    position: relative;
    display: inline-block;
}

.signed-more-btn {
    background-color: #5a6268;
    color: #fff;
}

.signed-pdf-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    min-width: 9rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 4px 0;
}

.signed-pdf-menu[hidden] {
    display: none !important;
}

.action-menu-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.9rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}

.action-menu-item:hover {
    background: #f0f4f8;
}

.correspondence-language-block {
    margin-top: 1rem;
    width: 100%;
    max-width: none;
}
.correspondence-language-block select {
    width: 100%;
    max-width: none;
}
.form-hint.subtle {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #64748b;
}
select.correspondence-lang-select {
    min-width: 11rem;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.col-correspondence-lang {
    white-space: normal;
}

.client-table--variant-my-clients:not(.client-table-signed) th:nth-child(4),
.client-table--variant-my-clients:not(.client-table-signed) td:nth-child(4) {
    width: 12rem;
    min-width: 11rem;
    max-width: 16rem;
    overflow: visible;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .client-table-responsive .client-table.client-table--variant-my-clients:not(.client-table-signed) {
        min-width: 38rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(1),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(1) {
        min-width: 10.5rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(2),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(2) {
        width: 8.5rem;
        min-width: 7.75rem;
        max-width: 9rem;
        white-space: nowrap;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(3),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(3) {
        width: 7.25rem;
        min-width: 6.5rem;
        max-width: 8rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(4),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(4) {
        width: 6.75rem;
        min-width: 5.75rem;
        max-width: 7.25rem;
    }

    .client-list-status-group--my-clients-row {
        gap: 0.25rem;
    }

    .client-list-container table.client-table--variant-my-clients .signed-list-icon-actions {
        gap: 0.2rem;
    }
}

@media (max-width: 660px) {
    .client-table-responsive .client-table.client-table--variant-my-clients:not(.client-table-signed) {
        min-width: 34rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(1),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(1) {
        min-width: 9rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(2),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(2) {
        width: 7.5rem;
        min-width: 7rem;
        max-width: 8rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(3),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(3) {
        width: 6.25rem;
        min-width: 5.75rem;
        max-width: 7rem;
    }

    .client-table--variant-my-clients:not(.client-table-signed) th:nth-child(4),
    .client-table--variant-my-clients:not(.client-table-signed) td:nth-child(4) {
        width: 5.75rem;
        min-width: 5rem;
        max-width: 6.25rem;
    }
}

/* „Allir skjólstæðingar“: sameining staðu (ikon) og tungumáls pósts — ein lína */
.client-all-status-lang {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.client-all-status-icons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.client-all-lang-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    flex-shrink: 0;
}
.client-lang-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
    min-height: 1.5rem;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.client-lang-chip-btn:hover {
    background: transparent;
    transform: scale(1.06);
}
.client-lang-chip-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.client-lang-flag-svg,
.client-lang-flag-img {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
}
.client-all-lang-row .correspondence-lang-select {
    margin-top: 0;
}
.signed-client-correspondence {
    margin: 1rem 0 1.25rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.signed-client-correspondence-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}
.signed-client-correspondence-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/*
 * Fjöldainnlestur: .form-container gefur sömu breidd/miðjun og padding og skráningarformið hér að ofan
 * (main.efni.efni--new-client .form-container). Aðeins viðbót: aðgreining að ofan.
 */
main.efni.efni--new-client .form-container.client-bulk-fullwidth {
    margin-top: 1.1rem;
    width: 100%;
    min-width: 0;
}

.client-bulk-section {
    margin-top: 0;
}

/* Kort: texti og reitur má ekki fæða út — jafn breitt og kassinn */
.client-bulk-section.menu-card,
.menu-card.client-bulk-section {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    text-align: left;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

/*
 * Fjöldainnlestur: .staff-bulk-* í styles.css notar dökka liti (fyrir ljótt kort) —
 * hærri sértækni + ljóst/ekki-ljós þema svo texti brotni ekki saman við #2b2d42.
 */
html[data-theme="light"] main.efni.efni--new-client .client-bulk-section .staff-bulk-heading {
    color: #0f172a;
    max-width: 100%;
}

html[data-theme="light"] main.efni.efni--new-client .client-bulk-section .staff-bulk-intro {
    color: #334155;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    hyphens: auto;
}

html[data-theme="light"] main.efni.efni--new-client .client-bulk-section .staff-bulk-intro strong {
    color: #0f172a;
}

/*
 * Fjöldainnlestur: reception .menu-card = hvítur „surface“ á dökkum síðubakgrunni (eins og staff-users töflur í light).
 * Þema á html á ekki að setja ljósan texta ofan á hvítan kassa.
 */
main.efni.efni--new-client .menu-card.client-bulk-section {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    color: #334155;
}

html[data-theme="dark"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-heading,
html:not([data-theme]) main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-heading,
html[data-theme="light"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-heading,
html[data-theme="dark"] main.efni.efni--new-client .menu-card.client-bulk-section h3.staff-bulk-heading,
html:not([data-theme]) main.efni.efni--new-client .menu-card.client-bulk-section h3.staff-bulk-heading,
html[data-theme="light"] main.efni.efni--new-client .menu-card.client-bulk-section h3.staff-bulk-heading {
    color: #0f172a;
    max-width: 100%;
}

html[data-theme="dark"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-intro,
html:not([data-theme]) main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-intro,
html[data-theme="light"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-intro,
html[data-theme="dark"] main.efni.efni--new-client .menu-card.client-bulk-section p.staff-bulk-intro,
html:not([data-theme]) main.efni.efni--new-client .menu-card.client-bulk-section p.staff-bulk-intro,
html[data-theme="light"] main.efni.efni--new-client .menu-card.client-bulk-section p.staff-bulk-intro {
    color: #334155;
    line-height: 1.55;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    hyphens: auto;
}

html[data-theme="dark"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-intro strong,
html:not([data-theme]) main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-intro strong,
html[data-theme="light"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-intro strong {
    color: #0f172a;
    font-weight: 700;
}

html[data-theme="dark"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-textarea,
html:not([data-theme]) main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-textarea,
html[data-theme="light"] main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-textarea {
    border: 2px solid #94a3b8;
    background-color: #ffffff;
    color: #0f172a;
}

main.efni.efni--new-client .menu-card.client-bulk-section .staff-bulk-label {
    color: #334155;
}

.client-bulk-section:not(.menu-card) .staff-bulk-label {
    color: var(--text-color2, #e2e8f0);
}

.client-bulk-section .staff-bulk-textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 9rem;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    main.efni.efni--new-client .form-container.client-bulk-fullwidth {
        margin-top: 0.85rem;
    }

    .menu-card.client-bulk-section {
        padding: 14px 12px;
    }

    .client-bulk-section .staff-bulk-intro {
        font-size: 0.9rem;
        line-height: 1.45;
    }
}

@media (max-width: 480px) {
    .menu-card.client-bulk-section {
        padding: 12px 10px;
    }
}

.client-bulk-section .staff-bulk-table-wrap {
    overflow-x: auto;
}

.client-bulk-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.74rem;
}

.client-bulk-table th:nth-child(1), .client-bulk-table td:nth-child(1) { width: 13%; }
.client-bulk-table th:nth-child(2), .client-bulk-table td:nth-child(2) { width: 9%; }
.client-bulk-table th:nth-child(3), .client-bulk-table td:nth-child(3) { width: 10%; }
.client-bulk-table th:nth-child(4), .client-bulk-table td:nth-child(4) { width: 11%; }
.client-bulk-table th:nth-child(5), .client-bulk-table td:nth-child(5) { width: 10%; }
.client-bulk-table th:nth-child(6), .client-bulk-table td:nth-child(6) { width: 4.5%; }
.client-bulk-table th:nth-child(7), .client-bulk-table td:nth-child(7) { width: 9%; }
.client-bulk-table th:nth-child(8), .client-bulk-table td:nth-child(8) { width: 4%; }
.client-bulk-table th:nth-child(9), .client-bulk-table td:nth-child(9) { width: 6%; }
.client-bulk-table th:nth-child(10), .client-bulk-table td:nth-child(10) { width: 8%; }
.client-bulk-table th:nth-child(11), .client-bulk-table td:nth-child(11) { width: 13%; }
.client-bulk-table th:nth-child(12), .client-bulk-table td:nth-child(12) { width: 2.5%; }

.client-bulk-table td {
    vertical-align: top;
    white-space: normal;
}

.client-bulk-table input,
.client-bulk-table select {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.7rem;
    padding: 0.22rem 0.32rem;
    min-height: 1.7rem;
}

.client-bulk-table .client-bulk-ssn,
.client-bulk-table .client-bulk-rep-ssn {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.client-bulk-table th {
    font-size: 0.66rem;
    white-space: nowrap;
    padding: 0.3rem 0.35rem;
}

.client-bulk-table td {
    padding: 0.3rem 0.35rem;
}

.client-bulk-table .client-bulk-cell-invalid {
    border: 1px solid #ef4444;
    background: #fff1f2;
}

.client-bulk-row-existing {
    background: #d1d5db;
}

.client-bulk-row-locked td {
    cursor: not-allowed;
}

.client-bulk-row-locked .client-bulk-cell,
.client-bulk-row-locked .staff-bulk-remove {
    pointer-events: none;
}

.client-bulk-row-locked input:disabled,
.client-bulk-row-locked select:disabled,
.client-bulk-row-locked button:disabled {
    background: #e5e7eb;
    color: #64748b;
    border-color: #94a3b8;
}

.client-bulk-row-existing .client-bulk-status {
    color: #991b1b;
    font-weight: 700;
}

.client-bulk-row-warning {
    background: #fff7ed;
}

.client-bulk-row-child td {
    color: #b91c1c;
}

.client-bulk-row-child .client-bulk-name,
.client-bulk-row-child .client-bulk-is-child {
    font-weight: 700;
    color: #991b1b;
}

.client-bulk-row-child input,
.client-bulk-row-child select,
.client-bulk-row-child .client-bulk-status {
    color: #991b1b;
}

.client-bulk-needs-rep-wrap {
    text-align: center;
}

.client-bulk-needs-rep-wrap .client-bulk-needs-rep {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0.15rem auto 0;
    min-height: 0;
}

.client-bulk-status {
    font-size: 0.69rem;
    line-height: 1.35;
    min-width: 0;
    word-break: break-word;
    color: #b91c1c;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .client-bulk-table {
        font-size: 0.7rem;
    }

    .client-bulk-table input,
    .client-bulk-table select {
        font-size: 0.68rem;
    }
}

@media (max-width: 920px) {
    .client-bulk-table th,
    .client-bulk-table td {
        width: auto;
        max-width: none;
    }

    .client-bulk-table thead {
        display: none;
    }

    .client-bulk-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem 0.75rem;
        padding: 0.58rem;
        border-bottom: 1px solid #d1d5db;
    }

    .client-bulk-table tbody td {
        display: flex;
        flex-direction: column;
        gap: 0.22rem;
        border: none;
        padding: 0;
        min-width: 0;
    }

    .client-bulk-table tbody td::before {
        content: attr(data-label);
        font-size: 0.66rem;
        font-weight: 700;
        color: #475569;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .client-bulk-table tbody td:nth-child(11),
    .client-bulk-table tbody td:nth-child(12) {
        grid-column: 1 / -1;
    }

    .client-bulk-status {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .client-bulk-table tbody tr {
        grid-template-columns: 1fr;
    }
}
