


:root {
    --background1: #2b2d42;
    --background2: #2b2d42;
    --text-color1: #edf2f4;
    --text-color2: #8d99ae;
    --error-message: #ef476f;
    --success-message: #06d6a0;
    --warning-message: #ffd166;
}

html[data-theme="light"] {
    --background1: #f3f5fa;
    --background2: #ffffff;
    --text-color1: #0f172a;
    --text-color2: #475569;
    --error-message: #dc2626;
    --success-message: #0f766e;
    --warning-message: #a16207;
}

body {
    background-color: var(--background1);
    color: var(--text-color1);
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    font-size: 17px;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--background2);
    padding: 20px;
    text-align: center;
    color: var(--text-color2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 42px;
    color: var(--text-color1);
}

/* Afgreiðsla / umsjón: haus, brauðmolar og útskrá — aðgreindur frá almennum header (numpad o.fl.) */
header.staff-portal-header {
    text-align: left;
    padding: 1rem clamp(1rem, 3vw, 1.75rem) 0;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.32);
    border-bottom: 1px solid rgba(237, 242, 244, 0.06);
}

.staff-portal-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
    align-items: start;
    gap: 0.5rem 1rem;
    width: 100%;
}

.staff-portal-header-side:first-child {
    min-height: 1px;
}

.staff-portal-header-side--start {
    justify-self: start;
    align-self: start;
    padding-top: 0.1rem;
}

/* „Til baka í afgreiðslu“: sömu grunnstílar og staff-nav-btn (staff-nav-btn--reception) + smávegis fínstilling í haus */
header.staff-portal-header a.staff-portal-back-btn {
    font-size: 0.9rem;
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    max-width: min(100%, 16rem);
    line-height: 1.25;
    text-align: center;
    justify-content: center;
}

header.staff-portal-header a.staff-portal-back-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

.staff-portal-header-title {
    grid-column: 2;
    justify-self: center;
    margin: 0;
    padding-top: 0.15rem;
    max-width: min(100%, 52rem);
    font-size: clamp(1.35rem, 2.8vw, 2.4rem);
    line-height: 1.2;
    color: var(--text-color1);
    text-align: center;
}

.staff-portal-header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    justify-content: flex-end;
    align-self: start;
    padding-top: 0.1rem;
}

.staff-account-menu {
    position: relative;
}

.staff-account-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(237, 242, 244, 0.35);
    background: rgba(237, 242, 244, 0.08);
    color: var(--text-color1);
    border-radius: 999px;
    padding: 0.2rem 0.45rem 0.2rem 0.2rem;
    min-height: 2.45rem;
    cursor: pointer;
}

.staff-account-menu-trigger:hover {
    background: rgba(237, 242, 244, 0.16);
    border-color: rgba(237, 242, 244, 0.5);
}

.staff-account-menu-trigger:focus-visible {
    outline: 2px solid var(--success-message);
    outline-offset: 2px;
}

.staff-account-avatar {
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e2e8f0;
    background: linear-gradient(135deg, #2563eb, #0f766e);
}

.staff-account-caret {
    font-size: 0.75rem;
    color: var(--text-color2);
}

.staff-account-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    width: min(19rem, 92vw);
    padding: 0.65rem 0.75rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.35);
    z-index: 80;
}

.staff-account-menu-name {
    margin: 0 0 0.5rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
}

.staff-account-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Aðgerðatenglar — litur (blár / fjólublár), án undirstrikunar */
.staff-account-menu-item--settings {
    color: #93c5fd;
    text-decoration: none;
}

.staff-account-menu-item--settings:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
}

.staff-account-menu-item--admin {
    color: #c4b5fd;
    text-decoration: none;
}

.staff-account-menu-item--admin:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #ddd6fe;
}

.staff-account-menu-item:focus-visible {
    outline: 2px solid var(--success-message);
    outline-offset: 2px;
}

.staff-account-menu-item-icon {
    flex: 0 0 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.staff-account-menu-svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    flex-shrink: 0;
}

.staff-account-menu-item--theme-toggle {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.45rem 0.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
    color: #e2e8f0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.staff-account-menu-item--theme-toggle:hover {
    background: rgba(148, 163, 184, 0.14);
    color: #f8fafc;
}

.staff-account-toggle-icon-moon {
    display: none;
}

html[data-theme="dark"] .staff-account-toggle-icon-sun {
    display: block;
}

html[data-theme="dark"] .staff-account-toggle-icon-moon {
    display: none;
}

html[data-theme="light"] .staff-account-toggle-icon-sun {
    display: none;
}

html[data-theme="light"] .staff-account-toggle-icon-moon {
    display: block;
}

/* Áður en JS setur data-theme: bíðum eftir dökku sjálfgefnu útliti */
html:not([data-theme]) .staff-account-toggle-icon-sun {
    display: block;
}

html:not([data-theme]) .staff-account-toggle-icon-moon {
    display: none;
}

.staff-account-menu-sep {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    margin: 0.55rem 0 0.25rem;
}

.staff-portal-logout-button--with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding-left: 0.5rem;
    padding-right: 0.65rem;
}

html[data-theme="light"] .staff-account-menu-trigger {
    border-color: rgba(15, 23, 42, 0.16);
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .staff-account-menu-trigger:hover {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .staff-account-menu-panel {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .staff-account-menu-name {
    color: #1e293b;
    font-weight: 700;
}

html[data-theme="light"] .staff-account-menu-item--theme-toggle {
    color: #334155;
}

html[data-theme="light"] .staff-account-menu-item--theme-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

html[data-theme="light"] .staff-account-menu-item--settings {
    color: #2563eb;
}

html[data-theme="light"] .staff-account-menu-item--settings:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

html[data-theme="light"] .staff-account-menu-item--admin {
    color: #6d28d9;
}

html[data-theme="light"] .staff-account-menu-item--admin:hover {
    background: rgba(109, 40, 217, 0.1);
    color: #5b21b6;
}

html[data-theme="light"] .staff-account-caret {
    color: #475569;
}

html[data-theme="light"] .staff-account-menu-sep {
    border-top-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .staff-account-menu-panel .staff-portal-logout-button {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.16);
    color: #0f172a;
    font-weight: 700;
    box-shadow: none;
}

html[data-theme="light"] .staff-account-menu-panel .staff-portal-logout-button:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.22);
    color: #0f172a;
    font-weight: 700;
    box-shadow: none;
}

.staff-portal-logout-form {
    margin: 0.7rem 0 0;
}

.staff-portal-logout-button {
    padding: 0.5rem 1.15rem;
    min-height: 2.6rem;
    min-width: 6.5rem;
    border: 1px solid rgba(237, 242, 244, 0.5);
    border-radius: 8px;
    background: rgba(237, 242, 244, 0.1);
    color: var(--text-color1);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a.staff-portal-logout-button,
a.staff-portal-logout-button:link,
a.staff-portal-logout-button:visited {
    text-decoration: none;
    color: var(--text-color1);
}

.staff-account-menu-panel .staff-portal-logout-button {
    width: 100%;
}

.staff-portal-logout-button:hover {
    background: rgba(237, 242, 244, 0.2);
    color: var(--text-color1);
    border-color: rgba(237, 242, 244, 0.75);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.staff-portal-logout-button:focus-visible {
    outline: 2px solid var(--success-message);
    outline-offset: 2px;
}

.staff-account-settings-main {
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}

.staff-account-settings-section {
    margin-top: 1.75rem;
}

.staff-account-settings-section:first-of-type {
    margin-top: 0.5rem;
}

.staff-account-settings-heading {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}

.staff-account-settings-hint {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    opacity: 0.88;
}

.staff-account-settings-flash {
    margin-bottom: 1rem;
}

.staff-portal-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0.35rem 0 0;
    padding: 0 0.15rem;
    font-size: 0.92rem;
    font-weight: 600;
}

header.staff-portal-header .staff-portal-breadcrumb {
    margin: 0.85rem 0 0;
    padding: 0.2rem 0;
    gap: 0.5rem 0.55rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    background: transparent;
    border: none;
    border-radius: 0;
    width: fit-content;
    max-width: 100%;
    box-shadow: none;
}

.staff-portal-header-alert {
    margin: 0.45rem 0 0.35rem;
    border-left: 4px solid rgba(248, 113, 113, 0.95);
    padding-left: 0.8rem;
}

/* Brauðmolar sem sýnilegir „hnappar“ (pill) — :link/:visited með hærri sérstæðu en sjálfgefinn vafri */
header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb,
header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:link,
header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 2.35rem;
    padding: 0.42rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    color: #f1f5f9;
    background: rgba(237, 242, 244, 0.14);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:hover {
    color: #ffffff;
    background: rgba(237, 242, 244, 0.26);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:active {
    transform: translateY(1px);
}

header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.95);
    outline-offset: 2px;
}

header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section,
header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section:link,
header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section:visited {
    color: #e8f3ff;
    background: rgba(59, 130, 246, 0.28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section:hover {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.42);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35);
}

.staff-portal-crumb-sep {
    color: rgba(203, 213, 225, 0.75);
    font-weight: 600;
    user-select: none;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0 0.05rem;
    align-self: center;
}

/* Ekki hvíta „stiku“ undir staff-hausi — rólegri aðskilnaður */
header.staff-portal-header .header-line {
    width: 100%;
    margin: 1rem 0 0;
    padding: 0;
    height: 1px;
    min-height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(237, 242, 244, 0.14) 35%, rgba(237, 242, 244, 0.14) 65%, transparent 100%);
    box-shadow: none;
    border-radius: 0;
    border: none;
    margin-bottom: 0.35rem;
}

/* „Til baka í afgreiðslu“ + langur titill: stack áður en mjótt farsímaskið (720px) */
@media (max-width: 960px) {
    .staff-portal-header-row--reception-back {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .staff-portal-header-row--reception-back .staff-portal-header-side--start {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        width: 100%;
        max-width: 100%;
    }

    .staff-portal-header-row--reception-back .staff-portal-header-side--start .staff-portal-back-btn {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .staff-portal-header-row--reception-back .staff-portal-header-title {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .staff-portal-header-row--reception-back .staff-portal-header-actions {
        grid-column: 1;
        grid-row: 3;
        justify-self: end;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .staff-portal-header-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .staff-portal-header-side:first-child {
        display: none;
    }

    .staff-portal-header-title {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        font-size: 1.25rem;
    }

    .staff-portal-header-actions {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
        width: 100%;
    }

    /* „Til baka í afgreiðslu“ — eftir almennum raðröðun (yfirskrifar grid-row) */
    .staff-portal-header-row--reception-back .staff-portal-header-side:first-child {
        display: block;
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        width: 100%;
    }

    .staff-portal-header-row--reception-back .staff-portal-header-title {
        grid-row: 2;
    }

    .staff-portal-header-row--reception-back .staff-portal-header-actions {
        grid-row: 3;
    }

    .staff-account-menu-panel {
        right: 0;
    }

    header.staff-portal-header .staff-portal-breadcrumb {
        max-width: 100%;
        width: auto;
        justify-content: flex-start;
    }
}

/* Yfirlitssíður með töflum nota sömu hámarksbreidd í kerfinu */
:root {
    --staff-table-page-max-width: min(96vw, 1480px);
}

/* Yfirlit starfsmannanotenda */
.staff-admin-page {
    width: 100%;
    max-width: var(--staff-table-page-max-width);
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
    box-sizing: border-box;
    /* Leyfir lárétt skrun í töfluþulunni innan 90% breiddar .efni */
    min-width: 0;
}

.staff-admin-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

/* Spurningalistar — tvíþrepa flakk (textatenglar + valfrjálst „Til baka“) */
.questionnaires-page-nav {
    margin: 0 0 1.35rem;
    border: 1px solid rgba(141, 153, 174, 0.28);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 19, 34, 0.35);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.questionnaires-page-nav--toolbar {
    padding: 0.55rem 1rem;
}

.questionnaires-page-nav--toolbar .staff-admin-nav {
    margin: 0;
}

.questionnaires-hub-nav-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.55rem 1rem;
    min-width: 0;
}

.questionnaires-hub-nav-bar--primary {
    border-bottom: 1px solid rgba(141, 153, 174, 0.22);
}

.questionnaires-hub-nav-bar--client {
    background: rgba(237, 242, 244, 0.04);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.questionnaires-hub-nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 1.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.questionnaires-hub-nav-list--client {
    margin-left: auto;
}

.questionnaires-hub-nav-link {
    display: inline-block;
    padding: 0.4rem 0.05rem;
    color: rgba(203, 213, 225, 0.92);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.questionnaires-hub-nav-link:hover {
    color: #f8fafc;
    text-decoration: none;
}

.questionnaires-hub-nav-link--active {
    color: #f8fafc;
    font-weight: 600;
    border-bottom-color: #38bdf8;
}

.questionnaires-page-back-link--bar {
    flex-shrink: 0;
}

.questionnaires-hub-nav-bar--client .questionnaires-page-back-link--bar {
    margin-right: 0.5rem;
}

@media (max-width: 640px) {
    .questionnaires-hub-nav-bar--client {
        flex-direction: column;
        align-items: stretch;
    }

    .questionnaires-hub-nav-list--client {
        margin-left: 0;
        width: 100%;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(141, 153, 174, 0.18);
    }
}

/* Brauðmolar á spurningalistum — textatenglar í stað pill-hnappa */
header.staff-portal-header nav.staff-portal-breadcrumb--text {
    gap: 0.35rem 0.5rem;
}

header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb,
header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb:link,
header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb:visited {
    min-height: 0;
    padding: 0.2rem 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(203, 213, 225, 0.9);
    font-weight: 500;
    font-size: 0.92rem;
}

header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb:hover {
    color: #f8fafc;
    background: transparent;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section,
header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section:link,
header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section:visited {
    color: #f8fafc;
    background: transparent;
    font-weight: 600;
    text-decoration: none;
}

header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section:hover {
    color: #ffffff;
    background: transparent;
    text-decoration: underline;
}

header.staff-portal-header nav.staff-portal-breadcrumb--text .staff-portal-crumb-sep {
    font-size: 0.85rem;
    opacity: 0.65;
}

/* Aðalflipar: Samþykki · Spurningalistar · … (í stað brauðmola) */
.staff-portal-section-nav {
    margin: 0.4rem 0 0.55rem;
    padding: 0 0 0.65rem;
    border-bottom: 1px solid rgba(141, 153, 174, 0.22);
    max-width: 100%;
}

html[data-theme="light"] .staff-portal-section-nav {
    border-bottom-color: #e2e8f0;
}

.staff-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.08s ease;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.staff-nav-btn:hover {
    filter: brightness(1.09);
    color: #fff;
}

.staff-nav-btn--management {
    background: linear-gradient(135deg, #5c6478, #3d4556);
}

.staff-nav-btn--new {
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

.staff-nav-btn--reception {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.staff-nav-btn--clients {
    background: linear-gradient(135deg, #ea580c, #c2410c);
}

.staff-nav-btn--questionnaires-hub {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
}

.staff-nav-btn--active {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.45),
        0 2px 10px rgba(0, 0, 0, 0.35);
    filter: brightness(1.12);
}

.staff-nav-btn--disabled-nav {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: linear-gradient(135deg, #4b5563, #374151);
}

.questionnaires-clients-page .questionnaires-clients-btn-q:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.questionnaires-clients-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.questionnaires-clients-row-hint {
    margin: 0.35rem 0 0.85rem;
    font-size: 0.92rem;
}

.questionnaires-clients-table .questionnaires-clients-th-kt,
.questionnaires-clients-table .questionnaires-clients-td-kt {
    width: 1%;
    max-width: 9.5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
}

.questionnaires-clients-table .questionnaires-clients-forms {
    white-space: normal;
    line-height: 1.35;
}

.questionnaires-clients-table .questionnaires-clients-th-actions,
.questionnaires-clients-table .questionnaires-clients-td-actions {
    text-align: right;
    vertical-align: middle;
    width: 4.75rem;
    min-width: 4.25rem;
    white-space: nowrap;
}

.questionnaires-clients-page .questionnaires-clients-row-actions {
    justify-content: flex-end;
    margin-left: auto;
}

.questionnaires-clients-toolbar .questionnaires-clients-new-client-btn {
    min-height: 2rem;
    padding: 0.38rem 0.8rem;
    font-size: 0.86rem;
    border-radius: 8px;
}

tr.questionnaires-client-row {
    cursor: pointer;
}

tr.questionnaires-client-row:hover td {
    background: rgba(255, 255, 255, 0.045);
}

tr.questionnaires-client-row:focus-visible {
    outline: 2px solid rgba(94, 234, 212, 0.65);
    outline-offset: -2px;
}

.questionnaires-workspace-back {
    margin: 0 0 0.75rem;
}

.staff-section-back-row {
    margin: 0 0 0.9rem;
}

.questionnaires-workspace-lead {
    margin: 0 0 1.25rem;
    max-width: 52rem;
    line-height: 1.55;
}

.questionnaires-workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.questionnaires-workspace-card {
    border-radius: 12px;
    border: 1px solid rgba(141, 153, 174, 0.35);
    background: rgba(15, 19, 34, 0.45);
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.questionnaires-workspace-card--wide {
    max-width: 52rem;
}

.questionnaires-workspace-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.questionnaires-workspace-stub {
    margin: 0.65rem 0 0;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

.questionnaires-workspace-lead--short {
    margin-bottom: 1rem;
}

.questionnaires-workspace-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(141, 153, 174, 0.38);
    background: rgba(18, 24, 42, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    max-width: 56rem;
}

.questionnaires-workspace-identity-name {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color1, #f1f5f9);
}

.questionnaires-workspace-identity-email {
    margin: 0;
    font-size: 0.95rem;
}

.questionnaires-workspace-mailto {
    font-size: 0.9rem;
    padding: 0.45rem 0.95rem;
}

.questionnaires-workspace-section {
    margin-bottom: 1.85rem;
    max-width: 56rem;
}

.questionnaires-workspace-section-title {
    margin: 0 0 0.65rem;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-color1, #f1f5f9);
}

.questionnaires-workspace-library-panel {
    border: 1px solid rgba(141, 153, 174, 0.35);
    border-radius: 12px;
    background: rgba(15, 19, 34, 0.42);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.questionnaires-workspace-library-toggle {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.9rem 1rem;
    font-size: 0.94rem;
    font-weight: 600;
    color: #e5e7eb;
    user-select: none;
}

.questionnaires-workspace-library-toggle::-webkit-details-marker {
    display: none;
}

.questionnaires-workspace-library-toggle__label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.questionnaires-workspace-library-toggle__label::before {
    content: "▸";
    font-size: 0.82rem;
    color: #cbd5e1;
    transition: transform 0.16s ease;
}

.questionnaires-workspace-library-panel[open] .questionnaires-workspace-library-toggle__label::before {
    transform: rotate(90deg);
}

.questionnaires-workspace-library-toggle__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.questionnaires-workspace-library-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(129, 140, 248, 0.35);
    color: #e0e7ff;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.questionnaires-workspace-library-panel__content {
    padding: 0 1rem 1rem;
}

.questionnaires-workspace-table-wrap {
    margin-bottom: 0.35rem;
}

.questionnaires-workspace-table .questionnaires-workspace-col-date {
    width: 9.5rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.questionnaires-workspace-table .questionnaires-workspace-col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.questionnaires-workspace-empty {
    padding: 0.85rem 1rem !important;
    font-style: italic;
}

.questionnaires-workspace-inline-hint {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
}

.questionnaires-workspace-foot {
    margin: 0.5rem 0 1.25rem;
    max-width: 52rem;
}

.questionnaires-workspace-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    margin: 0 0 0 0.35rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(55, 65, 81, 0.55);
    color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.72;
}

.questionnaires-workspace-btn--assign {
    border-color: rgba(251, 146, 60, 0.45);
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.35), rgba(194, 65, 12, 0.25));
}

.questionnaires-workspace-btn:first-child {
    margin-left: 0;
}

.questionnaires-workspace-btn--enabled {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.questionnaires-workspace-flash {
    margin: 0 0 0.85rem;
    max-width: 52rem;
}

.questionnaires-workspace-flash.questionnaires-flash--ok,
.questionnaires-workspace-flash.questionnaires-flash--err {
    line-height: 1.45;
    white-space: normal;
}

/*
 * Spurningalistar — vinnusvæði skjólstæðings: nýtir alla breidd .staff-admin-page á stórum skjám.
 * Almennar staff-users-table nth-child-reglur (nafn/hlutverk/…) passa ekki við þessa dálka og geta
 * knúið fram óþarfa lárétt skrun jafnvel þegar taflan er tóm.
 */
.questionnaires-client-workspace .questionnaires-workspace-section,
.questionnaires-client-workspace .questionnaires-workspace-identity {
    max-width: none;
    width: 100%;
}

.questionnaires-client-workspace .questionnaires-workspace-card--wide,
.questionnaires-client-workspace .questionnaires-workspace-flash,
.questionnaires-client-workspace .questionnaires-workspace-foot {
    max-width: none;
}

@media (min-width: 768px) {
    .questionnaires-client-workspace .staff-users-table-responsive {
        overflow-x: visible;
    }
}

.questionnaires-client-workspace .questionnaires-workspace-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.questionnaires-client-workspace .questionnaires-workspace-table thead th {
    white-space: normal;
    vertical-align: bottom;
}

/* Frátekið staff-users nth-child (% og min-width) — endurforða fyrir þessa töflu */
.questionnaires-client-workspace .questionnaires-workspace-table th:nth-child(n),
.questionnaires-client-workspace .questionnaires-workspace-table td:nth-child(n) {
    width: auto;
    min-width: 0;
    max-width: none;
    text-align: left;
}

.questionnaires-client-workspace .questionnaires-workspace-table th:first-child,
.questionnaires-client-workspace .questionnaires-workspace-table td:first-child {
    width: 34%;
    min-width: 11rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.questionnaires-client-workspace .questionnaires-workspace-table .questionnaires-workspace-col-date {
    width: 9.5rem;
    min-width: 9.5rem;
    max-width: 10rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.questionnaires-client-workspace .questionnaires-workspace-table .questionnaires-workspace-col-actions {
    width: 10rem;
    min-width: 8.5rem;
    max-width: 14rem;
    white-space: nowrap;
    text-align: right;
}

/* Bókasafn: miðjadálkur (lýsing) fær afgang */
.questionnaires-client-workspace .questionnaires-workspace-table th:nth-child(2):not(.questionnaires-workspace-col-date):not(.questionnaires-workspace-col-actions),
.questionnaires-client-workspace .questionnaires-workspace-table td:nth-child(2):not(.questionnaires-workspace-col-date):not(.questionnaires-workspace-col-actions) {
    width: auto;
    min-width: 10rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Bókasafn með gátreitum: fyrsti dálkur er gát, ekki nafn */
.questionnaires-client-workspace .questionnaires-workspace-table--library th:first-child,
.questionnaires-client-workspace .questionnaires-workspace-table--library td:first-child {
    width: 3rem;
    min-width: 3rem;
    max-width: 3.5rem;
    text-align: center;
    vertical-align: middle;
}

.questionnaires-client-workspace .questionnaires-workspace-table--library th:nth-child(2),
.questionnaires-client-workspace .questionnaires-workspace-table--library td:nth-child(2) {
    width: 34%;
    min-width: 10rem;
}

.questionnaires-client-workspace .questionnaires-workspace-table--library th:nth-child(3),
.questionnaires-client-workspace .questionnaires-workspace-table--library td:nth-child(3) {
    width: auto;
    min-width: 12rem;
}

.questionnaires-workspace-subtitle-cell {
    white-space: normal;
}

.questionnaires-workspace-desc-hover[data-tooltip] {
    position: relative;
    display: inline-block;
    cursor: help;
    border-bottom: 1px dotted rgba(148, 163, 184, 0.6);
}

.questionnaires-workspace-desc-hover[data-tooltip]:hover::after,
.questionnaires-workspace-desc-hover[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 60;
    left: 0;
    bottom: calc(100% + 0.45rem);
    min-width: 16rem;
    max-width: min(30rem, 70vw);
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.98);
    color: #e2e8f0;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.4);
}

.questionnaires-workspace-desc-hover[data-tooltip]:hover::before,
.questionnaires-workspace-desc-hover[data-tooltip]:focus-visible::before {
    content: "";
    position: absolute;
    z-index: 61;
    left: 1rem;
    bottom: calc(100% + 0.1rem);
    width: 0.6rem;
    height: 0.6rem;
    background: rgba(15, 23, 42, 0.98);
    border-right: 1px solid rgba(148, 163, 184, 0.45);
    border-bottom: 1px solid rgba(148, 163, 184, 0.45);
    transform: rotate(45deg);
}

.questionnaires-workspace-desc-hover[data-tooltip=""] {
    cursor: default;
    border-bottom: 0;
}

.questionnaires-client-workspace .questionnaires-workspace-table--library .questionnaires-workspace-td-select input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

/* Svarað með gátreitum fyrir samanburð (sama tafla og bókasafn: fyrsti dálkur gát) */
.questionnaires-client-workspace .questionnaires-workspace-table--answered-select th:first-child,
.questionnaires-client-workspace .questionnaires-workspace-table--answered-select td:first-child {
    width: 3rem;
    min-width: 3rem;
    max-width: 3.5rem;
    text-align: center;
    vertical-align: middle;
}

.questionnaires-client-workspace .questionnaires-workspace-table--answered-select th:nth-child(2),
.questionnaires-client-workspace .questionnaires-workspace-table--answered-select td:nth-child(2) {
    width: 28%;
    min-width: 9rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.questionnaires-client-workspace .questionnaires-workspace-table--answered-select .questionnaires-workspace-td-select input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.questionnaires-workspace-btn--compare {
    border-color: rgba(129, 140, 248, 0.55);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(79, 70, 229, 0.22));
}

.questionnaires-assignment-responses-compare-block {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.questionnaires-assignment-responses-compare-block:first-of-type {
    margin-top: 0.75rem;
    border-top: none;
    padding-top: 0;
}

.questionnaires-assignment-responses-compare-block-title {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.questionnaires-assignment-responses-compare-meta {
    margin: 0 0 0.65rem;
}

.questionnaires-compare-col-header-date {
    font-weight: 600;
    line-height: 1.25;
}

.questionnaires-compare-json-block + .questionnaires-compare-json-block {
    margin-top: 0.9rem;
}

.questionnaires-compare-json-title {
    margin: 0.9rem 0 0.35rem;
}

.questionnaires-assign-batch-form {
    margin-bottom: 1rem;
}

.questionnaires-recurrence-hint {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
}

.questionnaires-icon-btn--recurrence-cancel {
    color: #fca5a5;
}

.questionnaires-recurrence-modal {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 2rem;
}

.questionnaires-recurrence-modal[hidden] {
    display: none !important;
}

.questionnaires-recurrence-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(2px);
}

.questionnaires-recurrence-modal__dialog {
    position: relative;
    width: min(40rem, calc(100vw - 2rem));
    max-height: calc(100vh - 12vh);
    overflow: auto;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.55);
    padding: 1rem 1.1rem 1rem;
}

.questionnaires-recurrence-modal__title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #f8fafc;
}

.questionnaires-recurrence-modal__lead {
    margin: 0 0 0.85rem;
}

.questionnaires-recurrence-modal__enable {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.questionnaires-recurrence-modal__options {
    margin-top: 0.25rem;
}

.questionnaires-recurrence-modal__fieldset {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 0.55rem 0.75rem 0.65rem;
    margin: 0 0 0.85rem;
}

.questionnaires-recurrence-modal__fieldset legend {
    padding: 0 0.25rem;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.questionnaires-recurrence-modal__radio {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.35rem 0;
    cursor: pointer;
}

.questionnaires-recurrence-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.65rem 0.85rem;
    margin-bottom: 0.5rem;
}

.questionnaires-recurrence-modal__grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.86rem;
    color: #cbd5e1;
}

.questionnaires-recurrence-modal__grid input,
.questionnaires-recurrence-modal__grid select {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
}

.questionnaires-recurrence-modal__hint {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
}

.questionnaires-recurrence-modal__summary {
    margin: 0.5rem 0 0;
    font-size: 0.86rem;
}

.questionnaires-recurrence-modal__per-list-item {
    margin: 0.75rem 0;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.questionnaires-recurrence-modal__per-list-title {
    margin: 0 0 0.45rem;
    font-weight: 600;
    color: #f1f5f9;
}

.questionnaires-recurrence-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

body.questionnaires-recurrence-modal-open {
    overflow: hidden;
}

.questionnaires-remind-modal__dialog {
    width: min(46rem, calc(100vw - 2rem));
}

.questionnaires-remind-modal__dialog .questionnaires-recurrence-modal__lead {
    line-height: 1.28;
}

.questionnaires-remind-modal__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: stretch;
}

.questionnaires-remind-modal__option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
    min-height: 100%;
}

.questionnaires-remind-modal__option input[type="radio"],
.questionnaires-remind-modal__option input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: #38bdf8;
}

.questionnaires-remind-modal__option-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.18;
}

.questionnaires-remind-modal__option-text strong {
    color: #f8fafc;
}

.questionnaires-remind-modal__option-meta {
    font-size: 0.86rem;
    line-height: 1.18;
}

@media (max-width: 640px) {
    .questionnaires-remind-modal__dialog {
        width: min(34rem, calc(100vw - 1rem));
    }

    .questionnaires-remind-modal__list {
        grid-template-columns: 1fr;
    }
}

.questionnaires-assignment-responses-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.questionnaires-assignment-responses-pre {
    margin: 1rem 0 0;
    padding: 1rem 1.1rem;
    max-width: 100%;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.45;
    tab-size: 2;
    border-radius: 10px;
    border: 1px solid rgba(141, 153, 174, 0.35);
    background: rgba(15, 19, 34, 0.65);
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

.questionnaires-staff-answers-wrap {
    margin: 0.75rem 0 0;
}

/* Yfirskrifar almennar staff-users-table 3-dálka reglur (hægri ICF, 34/26/26 %) */
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table {
    table-layout: fixed;
    width: 100%;
    margin-top: 0.35rem;
}

.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table th,
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table td {
    vertical-align: top;
    text-align: left;
}

.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table th:nth-child(1),
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table td:nth-child(1) {
    width: 48%;
    min-width: 12rem;
}

.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table th:nth-child(2),
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table td:nth-child(2) {
    width: 28%;
    min-width: 7rem;
}

.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table--no-icf-col th:nth-child(1),
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table--no-icf-col td:nth-child(1) {
    width: 58%;
}

.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table--no-icf-col th:nth-child(2),
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table--no-icf-col td:nth-child(2) {
    width: 42%;
}

.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table th:nth-child(3),
.questionnaires-staff-answers-table-wrap .questionnaires-staff-answers-table td:nth-child(3) {
    width: 24%;
    min-width: 10rem;
    max-width: none;
    text-align: left;
}

.questionnaires-staff-answers-table .questionnaires-staff-answers-q {
    font-weight: 600;
    color: #0f172a;
    white-space: normal;
    word-break: break-word;
}

.questionnaires-staff-answers-table .questionnaires-staff-answers-a {
    white-space: pre-wrap;
    word-break: break-word;
    color: #0f172a;
}

.questionnaires-staff-answers-table .questionnaires-staff-answers-icf {
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    color: #475569;
}

.questionnaires-staff-answers-answer-text {
    display: block;
}

.questionnaires-staff-answers-score {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.82rem;
    line-height: 1.25;
    color: #64748b;
}

.questionnaires-staff-answers-table .questionnaires-staff-answers-icf::first-line {
    font-family: ui-monospace, monospace;
    font-weight: 600;
}

.questionnaires-staff-answers-table-wrap--compare-matrix {
    overflow-x: auto;
}

.questionnaires-staff-answers-table-wrap--compare-matrix .questionnaires-staff-answers-table--compare-matrix {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

/* Yfirskrifar staff-users-table (middle + hægri jöfnun á nth-child(3)) */
.questionnaires-staff-answers-table-wrap--compare-matrix
    table.questionnaires-staff-answers-table--compare-matrix.staff-users-table thead th,
.questionnaires-staff-answers-table-wrap--compare-matrix
    table.questionnaires-staff-answers-table--compare-matrix.staff-users-table tbody td {
    vertical-align: top;
    text-align: left;
    padding: 0.45rem 0.65rem;
}

.questionnaires-staff-answers-table-wrap--compare-matrix
    table.questionnaires-staff-answers-table--compare-matrix.staff-users-table th:nth-child(n),
.questionnaires-staff-answers-table-wrap--compare-matrix
    table.questionnaires-staff-answers-table--compare-matrix.staff-users-table td:nth-child(n) {
    text-align: left;
    width: auto;
    min-width: 0;
    max-width: none;
}

.questionnaires-staff-answers-table-wrap--compare-matrix
    .questionnaires-staff-answers-table--compare-matrix th:first-child,
.questionnaires-staff-answers-table-wrap--compare-matrix
    .questionnaires-staff-answers-table--compare-matrix td:first-child {
    width: 42%;
    min-width: 10rem;
}

/* Jafn breidd á svör/ICF dálkum (remainder deilist jafnt) */
.questionnaires-staff-answers-table-wrap--compare-matrix
    .questionnaires-staff-answers-table--compare-matrix th:not(:first-child),
.questionnaires-staff-answers-table-wrap--compare-matrix
    .questionnaires-staff-answers-table--compare-matrix td:not(:first-child) {
    width: 1%;
    min-width: 6.5rem;
}

.questionnaires-staff-answers-table-wrap--compare-matrix
    .questionnaires-staff-answers-table--compare-matrix .questionnaires-staff-answers-a,
.questionnaires-staff-answers-table-wrap--compare-matrix
    .questionnaires-staff-answers-table--compare-matrix .questionnaires-staff-answers-icf {
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.questionnaires-staff-answers-table-wrap--compare-matrix .questionnaires-staff-answers-answer-text,
.questionnaires-staff-answers-table-wrap--compare-matrix .questionnaires-staff-answers-score {
    display: block;
}

.questionnaires-staff-answers-table-wrap--compare-matrix .questionnaires-staff-answers-score {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.questionnaires-staff-answers-table-wrap--compare-icf {
    margin-top: 0.85rem;
}

.questionnaires-icf-profile {
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
}

.questionnaires-icf-profile-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #e2e8f0;
}

.questionnaires-icf-profile-lead {
    margin: 0 0 0.85rem;
}

.questionnaires-icf-profile-group {
    margin-bottom: 1rem;
}

.questionnaires-icf-profile-group-title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    color: #93c5fd;
}

/* Yfirskrifar almennar staff-users-table nth-child-reglur (34 % / 26 % / 26 %) */
.questionnaires-icf-profile-table-wrap .questionnaires-icf-profile-table {
    table-layout: fixed;
    width: 100%;
    min-width: 42rem;
}

.questionnaires-icf-profile-table th,
.questionnaires-icf-profile-table td {
    vertical-align: top;
    text-align: left;
}

.questionnaires-icf-profile-table th:nth-child(1),
.questionnaires-icf-profile-table td:nth-child(1) {
    width: 4.5rem;
    min-width: 4.5rem;
    max-width: 5.5rem;
    white-space: nowrap;
}

.questionnaires-icf-profile-table th:nth-child(2),
.questionnaires-icf-profile-table td:nth-child(2) {
    width: 11%;
    min-width: 6.5rem;
    max-width: 10rem;
}

.questionnaires-icf-profile-table th:nth-child(3),
.questionnaires-icf-profile-table td:nth-child(3) {
    width: 16%;
    min-width: 8rem;
    max-width: 12.5rem;
}

.questionnaires-icf-profile-table th:nth-child(4),
.questionnaires-icf-profile-table td:nth-child(4) {
    width: 38%;
    min-width: 10rem;
}

.questionnaires-icf-profile-table th:nth-child(5),
.questionnaires-icf-profile-table td:nth-child(5) {
    width: 30%;
    min-width: 8rem;
}

.questionnaires-icf-profile-code {
    font-family: ui-monospace, monospace;
    font-weight: 600;
    white-space: nowrap;
}

.questionnaires-icf-profile-title-col {
    font-size: 0.92rem;
    line-height: 1.35;
    word-break: break-word;
}

.questionnaires-icf-profile-table .questionnaires-icf-profile-q,
.questionnaires-icf-profile-table .questionnaires-icf-profile-a {
    font-size: 0.92rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.questionnaires-icf-profile-qualifier-num {
    display: inline-block;
    min-width: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
}

.questionnaires-icf-profile-qualifier-label {
    display: block;
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.questionnaires-icf-profile-unmapped {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.3);
}

.questionnaires-icf-profile-unmapped-list {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}

.questionnaires-anchor-target {
    scroll-margin-top: 5.5rem;
}

.questionnaires-staff-answers-title {
    margin: 0.75rem 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.questionnaires-assignment-responses .questionnaires-icf-profile.questionnaires-anchor-target {
    margin-top: 1.75rem;
}

.questionnaires-icf-profile-unmapped-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.88rem;
}

.questionnaires-assignment-json-details {
    margin: 1rem 0 0;
    padding: 0.5rem 0;
}

.questionnaires-assignment-json-details summary {
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.92rem;
    user-select: none;
}

.questionnaires-assignment-json-details summary:hover {
    color: #cbd5e1;
}

.questionnaires-workspace-col-score {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: pre-line;
    word-break: break-word;
    max-width: 11.5rem;
    line-height: 1.35;
    vertical-align: top;
}

.questionnaires-workspace-assign-bar {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.questionnaires-guest-other {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.questionnaires-guest-other-intro {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
}

.questionnaires-guest-other-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.55;
}

.questionnaires-guest-other-list a {
    color: #5eead4;
}

.questionnaires-assign-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.questionnaires-guest-body {
    min-height: 100vh;
    background: #0f131f;
    color: #e2e8f0;
}

.questionnaires-guest-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

.questionnaires-guest-card {
    max-width: 38rem;
    width: 100%;
    background: rgba(22, 28, 45, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 1.5rem 1.65rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.questionnaires-guest-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    font-weight: 600;
}

.questionnaires-guest-subtitle {
    margin: 0 0 0.65rem;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.5;
}

.questionnaires-guest-lead {
    margin: 0 0 0.75rem;
    line-height: 1.55;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.questionnaires-guest-alert {
    margin-bottom: 1rem;
}

.questionnaires-guest-card--answer {
    max-width: 46rem;
}

.guest-q-mount {
    margin-top: 1rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.guest-q-page-error {
    color: #fecaca;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.guest-q-weighted-host {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.guest-q-section-intro {
    margin: 0.25rem 0 0.15rem;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    color: #f1f5f9;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.guest-q-fieldset--weighted {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    position: relative;
    isolation: isolate;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.guest-q-fieldset--invalid {
    border-color: #ef4444;
    /* Innri áhersla — minna líklegt en box-shadow að „bleikja“ undir legend */
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.guest-q-fieldset--branch-skip {
    opacity: 0.58;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.28);
}

.guest-q-fieldset--branch-skip .guest-q-legend {
    color: #94a3b8;
}

.guest-q-fieldset--branch-skip .guest-q-radio-label,
.guest-q-fieldset--branch-skip .guest-q-duration-label,
.guest-q-fieldset--branch-skip .guest-q-numeric-unit {
    color: #94a3b8;
}

.guest-q-branch-skip-hint {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.guest-q-branch-skip-notice {
    margin: 0 0 1rem;
}

.guest-q-numeric-input,
.guest-q-duration-hours,
.guest-q-duration-minutes,
.guest-q-duration-single {
    width: 4.25rem;
    min-width: 3.5rem;
    max-width: 100%;
    padding: 0.4rem 0.55rem;
    font-size: 1rem;
    box-sizing: border-box;
}

.guest-q-duration-wrap--inactive {
    opacity: 0.72;
}

.guest-q-duration-wrap--inactive .guest-q-duration-label {
    color: #94a3b8;
}

html[data-theme="light"] .guest-q-duration-wrap--inactive .guest-q-duration-label {
    color: #64748b;
}

.guest-q-legend {
    position: relative;
    z-index: 1;
    float: unset;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0.55rem 0.35rem;
    margin: 0 0 0.45rem;
    border-radius: 6px;
    /* Ógegnsætt yfir ramma — texti helst skýr við rauða athugasemd */
    background-color: rgba(15, 23, 42, 0.92);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.38;
    color: #f1f5f9;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.guest-q-skip-label {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.5rem 0 0.65rem;
    font-size: 0.92rem;
    line-height: 1.4;
    cursor: pointer;
    color: #cbd5e1;
}

.guest-q-skip-label input {
    margin-top: 0.2rem;
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    accent-color: #14b8a6;
}

.guest-q-skip-label--secondary {
    margin-top: 0.85rem;
    margin-bottom: 0;
    font-size: 0.82rem;
    font-style: italic;
    font-weight: 400;
    color: #94a3b8;
}

.guest-q-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.guest-q-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    min-width: 0;
    max-width: 100%;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.45;
    cursor: pointer;
    color: #e2e8f0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.guest-q-radio-label input {
    margin-top: 0.2rem;
    accent-color: #14b8a6;
}

.guest-q-slider {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.guest-q-slider-value-wrap {
    color: #e2e8f0;
    font-size: 0.95rem;
}

.guest-q-slider-value {
    color: #f8fafc;
}

.guest-q-slider-range {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #334155 0%, #475569 100%);
    outline: none;
}

.guest-q-slider-range:focus,
.guest-q-slider-range:focus-visible {
    outline: 2px solid rgba(20, 184, 166, 0.45);
    outline-offset: 2px;
}

.guest-q-slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #14b8a6;
    border: 2px solid #ccfbf1;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.guest-q-slider-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #14b8a6;
    border: 2px solid #ccfbf1;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.guest-q-slider-range::-moz-range-track {
    height: 8px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, #334155 0%, #475569 100%);
}

.guest-q-slider-ticks {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1;
}

.guest-q-slider-tick {
    min-width: 0.9rem;
    text-align: center;
}

.guest-q-slider-anchors {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.86rem;
    color: #cbd5e1;
}

.guest-q-slider-anchor {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.35;
}

.guest-q-slider-anchor:first-child {
    text-align: left;
    padding-right: 0.25rem;
}

.guest-q-slider-anchor:last-child {
    text-align: right;
    padding-left: 0.25rem;
}

.guest-q-checklist-row {
    font-size: 1rem;
    font-weight: 400;
    color: #f1f5f9;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.guest-q-checklist-text {
    display: inline;
}

.guest-q-checklist-host {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.guest-q-wizard {
    margin-top: 0.5rem;
}

.guest-q-wizard-title {
    margin: 0.35rem 0 0.75rem;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.45;
    color: #f8fafc;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.guest-q-wizard-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.guest-q-wizard-error {
    color: #fecaca;
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
}

.guest-q-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.35rem;
}

.guest-q-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.questionnaires-guest-done {
    margin: 0.5rem 0 0;
    font-size: 1.05rem;
    color: #86efac;
    line-height: 1.5;
}

/* Gestaspurningalistar: ljóst þema þegar data-theme=light (sjá client-theme-head) */
html[data-theme="light"] .questionnaires-guest-body {
    background: var(--background1);
    color: var(--text-color1);
}

html[data-theme="light"] .questionnaires-guest-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .questionnaires-guest-title,
html[data-theme="light"] .questionnaires-guest-subtitle,
html[data-theme="light"] .questionnaires-guest-lead {
    color: var(--text-color1);
}

html[data-theme="light"] .questionnaires-guest-other-list a {
    color: #0f766e;
}

html[data-theme="light"] .guest-q-fieldset--weighted {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .guest-q-fieldset--invalid {
    border-color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.3);
}

html[data-theme="light"] .guest-q-fieldset--branch-skip {
    opacity: 0.72;
    background: #e2e8f0;
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .guest-q-fieldset--branch-skip .guest-q-legend {
    color: #64748b;
}

html[data-theme="light"] .guest-q-fieldset--branch-skip .guest-q-radio-label,
html[data-theme="light"] .guest-q-fieldset--branch-skip .guest-q-duration-label,
html[data-theme="light"] .guest-q-fieldset--branch-skip .guest-q-numeric-unit {
    color: #64748b;
}

html[data-theme="light"] .guest-q-legend {
    background-color: #f8fafc;
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-section-intro {
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-radio-label {
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-skip-label {
    color: var(--text-color2);
}

html[data-theme="light"] .guest-q-skip-label--secondary {
    color: var(--text-color2);
}

html[data-theme="light"] .guest-q-slider-value-wrap {
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-slider-value {
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-slider-range {
    background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

html[data-theme="light"] .guest-q-slider-range::-moz-range-track {
    background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

html[data-theme="light"] .guest-q-slider-ticks {
    color: var(--text-color2);
}

html[data-theme="light"] .guest-q-slider-anchors {
    color: var(--text-color2);
}

html[data-theme="light"] .guest-q-checklist-row {
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-wizard-title {
    color: var(--text-color1);
}

html[data-theme="light"] .guest-q-page-error,
html[data-theme="light"] .guest-q-wizard-error {
    color: #b91c1c;
}

html[data-theme="light"] .guest-q-actions {
    border-top-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .questionnaires-guest-done {
    color: #15803d;
}

.staff-users-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.85rem;
    min-height: 2rem;
}

.staff-users-filter-groups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
    flex: 1;
    min-width: 0;
}

.staff-users-filter-check {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    min-width: 0;
}

.staff-users-filter-check input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.staff-users-filter-check__content {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.82rem;
    border-radius: 12px;
    border: 1px solid rgba(141, 153, 174, 0.24);
    background: rgba(15, 23, 42, 0.45);
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.staff-users-filter-check__box {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.22);
    box-shadow: inset 0 0 0 0 rgba(13, 148, 136, 0.95);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.staff-users-filter-check:hover .staff-users-filter-check__content {
    background: rgba(148, 163, 184, 0.14);
    color: #f8fafc;
}

.staff-users-filter-check input:focus-visible + .staff-users-filter-check__content {
    outline: 2px solid rgba(56, 189, 248, 0.7);
    outline-offset: 2px;
}

.staff-users-filter-check input:checked + .staff-users-filter-check__content {
    background: rgba(34, 197, 94, 0.16);
    color: #f8fafc;
    border-color: rgba(52, 211, 153, 0.28);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.18);
}

.staff-users-filter-check input:checked + .staff-users-filter-check__content .staff-users-filter-check__box {
    border-color: rgba(20, 184, 166, 0.75);
    background: rgba(20, 184, 166, 0.16);
    box-shadow: inset 0 0 0 4px rgba(13, 148, 136, 0.95);
}

.staff-users-filter-password {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.staff-users-filter-password-legend {
    padding: 0;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: inherit;
}

.staff-users-filter-password-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(141, 153, 174, 0.24);
}

.staff-users-filter-password-option {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
}

.staff-users-filter-password-option input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.staff-users-filter-password-btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.05rem;
    padding: 0.48rem 0.9rem;
    border-radius: 9px;
    background: transparent;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.staff-users-filter-password-option:hover .staff-users-filter-password-btn {
    background: rgba(148, 163, 184, 0.14);
    color: #f8fafc;
}

.staff-users-filter-password-option input:focus-visible + .staff-users-filter-password-btn {
    outline: 2px solid rgba(56, 189, 248, 0.7);
    outline-offset: 2px;
}

.staff-users-filter-password-option input:checked + .staff-users-filter-password-btn {
    background: rgba(34, 197, 94, 0.16);
    color: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.28);
}

/* Notendayfirlit: dökk rammi, engin hvít „client“-plata */
.staff-users-table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    padding-bottom: 4px;
    border-radius: 12px;
    border: 1px solid rgba(141, 153, 174, 0.35);
    background: rgba(15, 19, 34, 0.45);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.staff-users-table-responsive .staff-users-table {
    /* fixed + fastar dálkar fyrir hlutverk/opna — fyrsti dálkur fær afgangspláss */
    min-width: 20.5rem;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.staff-users-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #3d4258 0%, #32374a 100%);
    color: var(--text-color1);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(141, 153, 174, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    vertical-align: middle;
}

.staff-users-table thead th.staff-users-th-actions {
    border-right: none;
    width: auto;
    min-width: 7.5rem;
    max-width: none;
    text-align: right;
    padding-right: 12px;
    padding-left: 8px;
}

.staff-users-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.staff-users-table thead th.sortable:hover {
    background: linear-gradient(180deg, #4a5068 0%, #3d4258 100%);
}

.staff-users-table thead th.sortable .sort-arrow {
    margin-left: 0.25rem;
    opacity: 0.85;
    font-size: 0.75em;
}

.staff-users-table thead th.sortable.active .sort-arrow {
    color: var(--success-message);
}

.staff-users-table tbody td {
    background: rgba(43, 45, 66, 0.55);
    color: var(--text-color1);
    padding: 13px 16px;
    border-bottom: 1px solid rgba(141, 153, 174, 0.22);
    border-right: 1px solid rgba(141, 153, 174, 0.12);
    vertical-align: middle;
    font-size: 0.95rem;
    line-height: 1.35;
}

.staff-users-table tbody td:last-child {
    border-right: none;
}

.staff-users-table tbody tr:last-child td {
    border-bottom: none;
}

.staff-users-table tbody tr:hover td {
    background: rgba(58, 62, 86, 0.72);
}

.staff-users-table .staff-users-actions {
    width: auto;
    min-width: 7.5rem;
    max-width: none;
    vertical-align: middle;
    text-align: right;
    white-space: nowrap;
    padding-right: 12px;
    padding-left: 8px;
    box-sizing: border-box;
}

.staff-users-table th,
.staff-users-table td {
    vertical-align: middle;
}

/* Nafn | Hlutverk | Breytt lykilorð | Opna */
.staff-users-table td:nth-child(1),
.staff-users-table th:nth-child(1) {
    width: 34%;
    min-width: 8rem;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
}

.staff-users-table th:nth-child(2),
.staff-users-table td:nth-child(2) {
    width: 26%;
    min-width: 6rem;
    white-space: normal;
}

.staff-users-table th:nth-child(3),
.staff-users-table td:nth-child(3) {
    width: 26%;
    min-width: 7.5rem;
    text-align: right;
}

.staff-users-table .status-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.staff-users-table .status-confirmed {
    background: rgba(6, 214, 160, 0.18);
    color: #8ff5d6;
    border: 1px solid rgba(6, 214, 160, 0.45);
}

.staff-users-table .status-revoked {
    background: rgba(239, 71, 111, 0.14);
    color: #ffc2ce;
    border: 1px solid rgba(239, 71, 111, 0.4);
}

.staff-users-table thead tr:first-child th:first-child {
    border-top-left-radius: 11px;
}

.staff-users-table thead tr:first-child th:last-child {
    border-top-right-radius: 11px;
}

.staff-users-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 11px;
}

.staff-users-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 11px;
}

/* Aðgerðir: tákn (reception.css — .questionnaires-icon-btn); litir yfirskrifaðir hér */
.staff-users-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.staff-users-inline-form {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: middle;
}

.staff-users-toggle-na {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    opacity: 0.5;
    color: var(--text-color2);
    pointer-events: none;
}

.staff-users-icon-btn--open {
    color: var(--text-color1);
}

.staff-users-icon-btn--delete {
    color: #ffb8b8;
}

.staff-users-table .staff-users-icon-btn--delete:hover:not(:disabled) {
    color: #fca5a5;
}

html[data-theme="light"] .staff-users-icon-btn--delete {
    color: #b91c1c;
}

html[data-theme="light"] .staff-users-table .staff-users-icon-btn--delete:hover:not(:disabled) {
    color: #991b1b;
}

.staff-users-icon-btn--account-on {
    color: #8ff5d6;
}

.staff-users-table .staff-users-icon-btn--account-on:hover:not(:disabled) {
    color: #c6ffea;
}

.staff-users-icon-btn--account-off {
    color: #ffb8c8;
}

.staff-users-table .staff-users-icon-btn--account-off:hover:not(:disabled) {
    color: #ffd6e0;
}

html[data-theme="light"] .staff-users-icon-btn--account-on {
    color: #0f766e;
}

html[data-theme="light"] .staff-users-table .staff-users-icon-btn--account-on:hover:not(:disabled) {
    color: #0d9488;
}

html[data-theme="light"] .staff-users-icon-btn--account-off {
    color: #b91c1c;
}

html[data-theme="light"] .staff-users-table .staff-users-icon-btn--account-off:hover:not(:disabled) {
    color: #991b1b;
}

.staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide,
.staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide path,
.staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide line {
    color: var(--text-color1) !important;
    stroke: var(--text-color1) !important;
}

.staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide,
.staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide path,
.staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide line,
.staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide polyline,
.staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide circle {
    color: #8ff5d6 !important;
    stroke: #8ff5d6 !important;
}

.staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide,
.staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide path,
.staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide line,
.staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide circle {
    color: #ffb8c8 !important;
    stroke: #ffb8c8 !important;
}

html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide path,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide line {
    color: #0f172a !important;
    stroke: #0f172a !important;
}

html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide path,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide line,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide path,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--open .questionnaires-lucide line {
    color: #0f172a !important;
    stroke: #0f172a !important;
}

html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide path,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide line,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide polyline,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide circle {
    color: #0f766e !important;
    stroke: #0f766e !important;
}

html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide path,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide line,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide polyline,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide circle,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide path,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide line,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide polyline,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-on .questionnaires-lucide circle {
    color: #0f766e !important;
    stroke: #0f766e !important;
}

html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide path,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide line,
html[data-theme="light"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide circle {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide path,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide line,
html[data-theme="dark"] .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide circle,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide path,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide line,
html:not([data-theme]) .staff-users-row-actions .staff-users-icon-btn--account-off .questionnaires-lucide circle {
    color: #b91c1c !important;
    stroke: #b91c1c !important;
}

.staff-users-toggle-na .questionnaires-lucide,
.staff-users-toggle-na .questionnaires-lucide circle,
.staff-users-toggle-na .questionnaires-lucide line,
.staff-users-toggle-na .questionnaires-lucide path,
.staff-users-toggle-na .questionnaires-lucide rect {
    color: var(--text-color2) !important;
    stroke: var(--text-color2) !important;
}

.staff-users-table .staff-users-action-form .search-button {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
}

.staff-users-btn-enable {
    background: linear-gradient(135deg, #0d9488, #0f766e) !important;
    font-size: 0.85rem;
}

.staff-users-filter-count {
    color: var(--text-color2);
    font-size: 15px;
}

.staff-users-role-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.staff-users-inactive-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    background: rgba(239, 71, 111, 0.22);
    color: #ffb8c8;
    border: 1px solid rgba(239, 71, 111, 0.45);
    line-height: 1.2;
    white-space: nowrap;
}

.staff-users-table tbody tr.staff-user-row--disabled td {
    background: rgba(30, 34, 48, 0.75);
    color: rgba(226, 232, 240, 0.72);
    border-bottom-color: rgba(100, 116, 139, 0.28);
    border-right-color: rgba(100, 116, 139, 0.15);
}

.staff-users-table tbody tr.staff-user-row--disabled:hover td {
    background: rgba(38, 42, 58, 0.82);
    color: rgba(226, 232, 240, 0.78);
}

.staff-users-table tbody tr.staff-user-row--disabled .staff-users-name-only {
    color: rgba(203, 213, 225, 0.72);
}

.staff-users-table tbody tr.staff-user-row--pending-setup td {
    background: rgba(255, 209, 102, 0.14);
    border-bottom-color: rgba(255, 209, 102, 0.32);
    border-right-color: rgba(255, 209, 102, 0.18);
}

.staff-users-table tbody tr.staff-user-row--pending-setup:hover td {
    background: rgba(255, 209, 102, 0.22);
}

/* Ljósir töflufletir í öllum þemum: dökk síða/umgjörð en taflan sjálf hvít og skýr */
html[data-theme="light"] .staff-users-table-responsive,
html[data-theme="dark"] .staff-users-table-responsive,
html:not([data-theme]) .staff-users-table-responsive {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .staff-users-filter-check__content {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

html[data-theme="light"] .staff-users-filter-check__box {
    border-color: rgba(100, 116, 139, 0.45);
    background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .staff-users-filter-check:hover .staff-users-filter-check__content {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

html[data-theme="light"] .staff-users-filter-check input:checked + .staff-users-filter-check__content {
    background: rgba(13, 148, 136, 0.12);
    color: #0f172a;
    border-color: rgba(13, 148, 136, 0.25);
    box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.2);
}

html[data-theme="light"] .staff-users-filter-password-toggle {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .staff-users-filter-password-btn {
    color: #475569;
}

html[data-theme="light"] .staff-users-filter-password-option:hover .staff-users-filter-password-btn {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

html[data-theme="light"] .staff-users-filter-password-option input:checked + .staff-users-filter-password-btn {
    background: rgba(13, 148, 136, 0.12);
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.25);
}

html[data-theme="light"] .staff-users-table thead th {
    background: #f8fafc;
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    border-right: 1px solid rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .staff-users-table thead th.sortable:hover {
    background: #f1f5f9;
}

html[data-theme="dark"] .staff-users-table thead th,
html:not([data-theme]) .staff-users-table thead th {
    background: linear-gradient(180deg, #3d4258 0%, #32374a 100%);
    color: #f8fafc;
    border-bottom: 1px solid rgba(141, 153, 174, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .staff-users-table thead th.sortable:hover,
html:not([data-theme]) .staff-users-table thead th.sortable:hover {
    background: linear-gradient(180deg, #4a5068 0%, #3d4258 100%);
}

html[data-theme="light"] .staff-users-table tbody td,
html[data-theme="dark"] .staff-users-table tbody td,
html:not([data-theme]) .staff-users-table tbody td {
    background: #f8fafc;
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-right: 1px solid rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .staff-users-table tbody tr:hover td,
html[data-theme="dark"] .staff-users-table tbody tr:hover td,
html:not([data-theme]) .staff-users-table tbody tr:hover td {
    background: #e9eff6;
}

html[data-theme="light"] .staff-users-table tbody tr.staff-user-row--pending-setup td,
html[data-theme="dark"] .staff-users-table tbody tr.staff-user-row--pending-setup td,
html:not([data-theme]) .staff-users-table tbody tr.staff-user-row--pending-setup td {
    background: rgba(250, 204, 21, 0.14);
    border-bottom-color: rgba(180, 83, 9, 0.22);
    border-right-color: rgba(180, 83, 9, 0.12);
}

html[data-theme="light"] .staff-users-table tbody tr.staff-user-row--pending-setup:hover td,
html[data-theme="dark"] .staff-users-table tbody tr.staff-user-row--pending-setup:hover td,
html:not([data-theme]) .staff-users-table tbody tr.staff-user-row--pending-setup:hover td {
    background: rgba(250, 204, 21, 0.22);
}

html[data-theme="light"] .staff-users-inactive-badge,
html[data-theme="dark"] .staff-users-inactive-badge,
html:not([data-theme]) .staff-users-inactive-badge {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.35);
}

html[data-theme="light"] .staff-users-table tbody tr.staff-user-row--disabled td,
html[data-theme="dark"] .staff-users-table tbody tr.staff-user-row--disabled td,
html:not([data-theme]) .staff-users-table tbody tr.staff-user-row--disabled td {
    background: #f1f5f9;
    color: #64748b;
    border-bottom-color: rgba(100, 116, 139, 0.2);
    border-right-color: rgba(100, 116, 139, 0.1);
}

html[data-theme="light"] .staff-users-table tbody tr.staff-user-row--disabled:hover td,
html[data-theme="dark"] .staff-users-table tbody tr.staff-user-row--disabled:hover td,
html:not([data-theme]) .staff-users-table tbody tr.staff-user-row--disabled:hover td {
    background: #e2e8f0;
    color: #475569;
}

html[data-theme="light"] .staff-users-table tbody tr.staff-user-row--disabled .staff-users-name-only,
html[data-theme="dark"] .staff-users-table tbody tr.staff-user-row--disabled .staff-users-name-only,
html:not([data-theme]) .staff-users-table tbody tr.staff-user-row--disabled .staff-users-name-only {
    color: #64748b;
}

html[data-theme="light"] .staff-users-table .status-confirmed,
html[data-theme="dark"] .staff-users-table .status-confirmed,
html:not([data-theme]) .staff-users-table .status-confirmed {
    background: rgba(13, 148, 136, 0.12);
    color: #0f766e;
    border: 1px solid rgba(13, 148, 136, 0.35);
}

html[data-theme="light"] .staff-users-table .status-revoked,
html[data-theme="dark"] .staff-users-table .status-revoked,
html:not([data-theme]) .staff-users-table .status-revoked {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.28);
}

html[data-theme="light"] tr.questionnaires-client-row:hover td,
html[data-theme="dark"] tr.questionnaires-client-row:hover td,
html:not([data-theme]) tr.questionnaires-client-row:hover td {
    background: #e9eff6;
}

html[data-theme="light"] .questionnaires-workspace-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .questionnaires-workspace-library-panel {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .questionnaires-workspace-library-toggle {
    color: #0f172a;
}

html[data-theme="light"] .questionnaires-workspace-library-toggle__label::before {
    color: #475569;
}

html[data-theme="light"] .questionnaires-workspace-library-count {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(99, 102, 241, 0.18);
    color: #4338ca;
}

html[data-theme="light"] .questionnaires-workspace-identity {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: none;
}

html[data-theme="light"] .questionnaires-workspace-identity-name,
html[data-theme="light"] .questionnaires-workspace-section-title {
    color: #0f172a;
}

html[data-theme="light"] .questionnaires-workspace-btn {
    background: #f1f5f9;
    color: #64748b;
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .questionnaires-workspace-btn--assign {
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(234, 88, 12, 0.28);
}

html[data-theme="light"] .questionnaires-workspace-btn--compare {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(79, 70, 229, 0.28);
}

html[data-theme="light"] .staff-detail-meta {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .questionnaires-workspace-desc-hover[data-tooltip]:hover::after,
html[data-theme="light"] .questionnaires-workspace-desc-hover[data-tooltip]:focus-visible::after {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .questionnaires-workspace-desc-hover[data-tooltip]:hover::before,
html[data-theme="light"] .questionnaires-workspace-desc-hover[data-tooltip]:focus-visible::before {
    background: #ffffff;
    border-right-color: rgba(15, 23, 42, 0.12);
    border-bottom-color: rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .questionnaires-assignment-responses-pre {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] .questionnaires-staff-answers-table .questionnaires-staff-answers-q {
    color: #0f172a;
}

html[data-theme="light"] .questionnaires-staff-answers-table .questionnaires-staff-answers-a {
    color: #334155;
}

html[data-theme="light"] .questionnaires-staff-answers-table .questionnaires-staff-answers-icf {
    color: #475569;
}

html[data-theme="light"] .questionnaires-assignment-json-details summary {
    color: #64748b;
}

/* Brauðmolar undir staff-hausi: dökkur „pill“-stíll passar ekki á hvítan haus */
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:link,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:visited {
    color: #0f172a;
    background: #f1f5f9;
    box-shadow: none;
}

html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb:hover {
    color: #0f172a;
    background: #e2e8f0;
    box-shadow: none;
}

html[data-theme="light"] header.staff-portal-header a.staff-portal-back-btn {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] header.staff-portal-header a.staff-portal-back-btn:focus-visible {
    outline-color: #1d4ed8;
}

html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section:link,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section:visited {
    color: #1e40af;
    background: rgba(59, 130, 246, 0.12);
    box-shadow: none;
}

html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb a.staff-portal-crumb--section:hover {
    color: #1e3a8a;
    background: rgba(59, 130, 246, 0.2);
    box-shadow: none;
}

html[data-theme="light"] .staff-portal-crumb-sep {
    color: #94a3b8;
}

html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb:link,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb:visited {
    color: #475569;
    background: transparent;
}

html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb:hover {
    color: #0f172a;
    background: transparent;
}

html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section:link,
html[data-theme="light"] header.staff-portal-header nav.staff-portal-breadcrumb--text a.staff-portal-crumb--section:visited {
    color: #0f172a;
    background: transparent;
}

html[data-theme="light"] .questionnaires-page-nav {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .questionnaires-hub-nav-bar--primary {
    border-bottom-color: #e2e8f0;
}

html[data-theme="light"] .questionnaires-hub-nav-bar--client {
    background: #f1f5f9;
}

html[data-theme="light"] .questionnaires-hub-nav-link {
    color: #475569;
}

html[data-theme="light"] .questionnaires-hub-nav-link:hover {
    color: #0f172a;
}

html[data-theme="light"] .questionnaires-hub-nav-link--active {
    color: #0f172a;
    border-bottom-color: #2563eb;
}

html[data-theme="light"] header.staff-portal-header .header-line {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(15, 23, 42, 0.08) 35%,
        rgba(15, 23, 42, 0.08) 65%,
        transparent 100%
    );
}

html[data-theme="light"] header.staff-portal-header {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.staff-users-actions {
    white-space: nowrap;
}

.staff-users-action-form {
    display: inline-block;
    margin: 0;
}

.staff-users-btn-danger {
    background-color: #b33 !important;
    font-size: 0.85rem;
}

.staff-users-action-na {
    color: var(--text-color2);
}

.staff-detail-meta {
    margin: 1.25rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(15, 19, 34, 0.18);
    border: 1px solid rgba(100, 116, 139, 0.35);
    font-size: 0.95rem;
}

.staff-detail-meta p {
    margin: 0.4rem 0;
}

.staff-detail-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #64748b;
}

.staff-detail-readonly {
    margin: 0.25rem 0 0;
    font-weight: 600;
    color: #1e293b;
}

.staff-detail-field-label {
    font-weight: 600;
    color: #1e293b;
}

.staff-detail-subtitle {
    margin: 1.5rem 0 0.5rem;
    color: #1e293b;
}

.staff-user-detail-account-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 116, 139, 0.35);
}

/* Notandaaðgerð — sama jaðraða hugsun og fyrstu skráningu */
.menu-card.staff-user-detail-card--accent {
    text-align: left;
    border: 2px solid rgba(6, 214, 160, 0.45);
    box-shadow: 0 4px 20px rgba(6, 214, 160, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.staff-user-detail-card--accent .staff-new-user-card-title {
    color: #0d7a5c;
    font-size: 1.35rem;
}

.staff-user-detail-card--accent .staff-detail-meta {
    background: rgba(6, 214, 160, 0.06);
    border-color: rgba(6, 214, 160, 0.28);
}

.staff-user-detail-password-row {
    margin: 0 0 1.25rem;
    padding: 0;
}

.staff-user-detail-password-row .staff-user-detail-password-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--background1);
    background: linear-gradient(180deg, #3dd9b1 0%, var(--success-message) 100%);
    box-shadow: 0 2px 8px rgba(6, 214, 160, 0.3);
    transition: filter 0.2s ease;
}

.staff-user-detail-password-row .staff-user-detail-password-link:hover {
    filter: brightness(1.06);
}

.staff-user-detail-card--accent .staff-new-user-submit.search-button {
    padding: 0.55rem 1.35rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    color: var(--background1);
    background: linear-gradient(180deg, #3dd9b1 0%, var(--success-message) 100%);
    box-shadow: 0 2px 8px rgba(6, 214, 160, 0.3);
}

.staff-user-detail-card--accent .staff-new-user-submit.search-button:hover {
    filter: brightness(1.06);
}

@media (max-width: 768px) {
    .staff-admin-page {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .staff-users-table thead th {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    .staff-users-table tbody td {
        padding: 9px 12px;
        font-size: 0.88rem;
    }

    .staff-users-filter-label {
        font-size: 15px;
    }

    .staff-users-filter-count {
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .staff-users-filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.staff-new-user-form {
    max-width: 32rem;
}

.staff-new-user-card {
    color: #1a1a2e;
}

.staff-new-user-card-title {
    margin-top: 0;
    color: #1e293b;
}

.staff-new-user-intro {
    color: #475569;
    margin-top: 0;
    line-height: 1.45;
}

.staff-new-user-form .in-form label {
    display: block;
    color: #334155;
    font-weight: 600;
    font-size: 15px;
    margin-top: 0.35rem;
}

/* Sérstilling yfir almenna input[type=...] sem hefur border:none — annars hverfur ramminn á starfsmannasíðum */
.staff-new-user-form input.staff-new-user-input,
.staff-new-user-form select.staff-new-user-select {
    width: 100%;
    max-width: 28rem;
    margin-top: 0.35rem;
    padding: 0.6rem 0.75rem;
    font-size: 16px;
    color: #0f172a;
    background: #ffffff;
    border: 2px solid #94a3b8;
    border-radius: 6px;
    box-sizing: border-box;
    min-width: 0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.staff-new-user-form input.staff-new-user-input::placeholder {
    color: #94a3b8;
}

.staff-new-user-form input.staff-new-user-input:focus,
.staff-new-user-form select.staff-new-user-select:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.staff-user-detail-card--accent .staff-new-user-form input.staff-new-user-input:focus,
.staff-user-detail-card--accent .staff-new-user-form select.staff-new-user-select:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.staff-new-user-actions {
    margin-top: 1.25rem;
}

.staff-new-user-submit.search-button {
    opacity: 1;
    filter: none;
    font-weight: 600;
}

/* Velja lykilorð (Dokobit / boð eða gleymt) — lesanlegur hnappur og tengill */
.staff-choose-password-page .staff-pw-choose-intro {
    max-width: 32rem;
    margin: 0 auto 1.25rem;
    color: #c8d4e8;
    line-height: 1.5;
}

.staff-choose-password-page .staff-pw-choose-requirements {
    max-width: 32rem;
    margin: 0 auto 1.1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #c8d4e8;
    opacity: 0.92;
}

.staff-choose-password-page .staff-pw-choose-input {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.staff-choose-password-page .staff-pw-choose-actions {
    margin-top: 1rem;
    text-align: center;
}

.staff-choose-password-page .staff-pw-choose-submit {
    padding: 0.55rem 1.35rem;
    background: linear-gradient(180deg, #34e0b0 0%, #06d6a0 50%, #0a9f78 100%);
    color: #0f172a;
    border: 1px solid rgba(4, 120, 87, 0.95);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(6, 214, 160, 0.35);
    transition: filter 0.15s ease, transform 0.1s ease;
}

.staff-choose-password-page .staff-pw-choose-submit:hover {
    filter: brightness(1.07);
}

.staff-choose-password-page .staff-pw-choose-submit:active {
    transform: translateY(1px);
}

.staff-choose-password-page .staff-pw-choose-footer {
    text-align: center;
    margin-top: 1.25rem;
}

.staff-choose-password-page .staff-pw-choose-footlink {
    color: #a5d8ff;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    font-size: 0.95rem;
}

.staff-choose-password-page .staff-pw-choose-footlink:hover {
    color: #e8f6ff;
}

/* Sjálfviljug lykilorðsbreyting — hætta við og halda núverandi */
.staff-change-own-password-footer {
    max-width: 32rem;
    margin: 1.25rem auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
}

.staff-change-own-password-logout-form {
    display: inline;
    margin: 0;
}

.staff-pw-voluntary-cancel-link {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(165, 216, 255, 0.6);
    border-radius: 8px;
    color: #c8ebff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.staff-pw-voluntary-cancel-link:hover {
    background: rgba(165, 216, 255, 0.14);
    color: #f5fbff;
    border-color: rgba(224, 242, 255, 0.85);
}

.staff-bulk-divider {
    border: 0;
    border-top: 1px solid #cbd5e1;
    margin: 2rem 0 1.5rem;
}

.staff-bulk-section {
    text-align: left;
    max-width: min(56rem, 100%);
    margin: 0 auto;
    box-sizing: border-box;
}

.staff-bulk-heading {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-size: 1.2rem;
}

.staff-bulk-intro {
    color: #475569;
    line-height: 1.5;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.staff-bulk-intro kbd {
    padding: 0.1rem 0.35rem;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background: #f8fafc;
    font-size: 0.85em;
}

.staff-bulk-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
    font-size: 15px;
}

.staff-bulk-textarea {
    width: 100%;
    max-width: 42rem;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    font-size: 15px;
    font-family: ui-monospace, monospace;
    border: 2px solid #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
}

.staff-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 0.75rem;
}

.staff-bulk-role-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.staff-bulk-role-label {
    font-weight: 600;
    color: #334155;
    font-size: 15px;
}

.staff-bulk-role-select {
    min-width: 16rem;
}

.staff-bulk-table-wrap {
    margin-top: 1.25rem;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.staff-bulk-commit-form {
    max-width: 100%;
}

.staff-bulk-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    line-height: 1.25;
    background: #fff;
    table-layout: fixed;
}

.staff-bulk-table th,
.staff-bulk-table td {
    border: 1px solid #94a3b8;
    padding: 0.25rem 0.3rem;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
}

.staff-bulk-table th {
    background: #f1f5f9;
    text-align: left;
    font-weight: 600;
    color: #334155;
    font-size: 0.68rem;
    letter-spacing: 0.01em;
}

.staff-bulk-table th:nth-child(1),
.staff-bulk-table td:nth-child(1) {
    width: 12%;
}

.staff-bulk-table th:nth-child(2),
.staff-bulk-table td:nth-child(2) {
    width: 11%;
}

.staff-bulk-table th:nth-child(3),
.staff-bulk-table td:nth-child(3) {
    width: 18%;
}

.staff-bulk-table th:nth-child(4),
.staff-bulk-table td:nth-child(4) {
    width: 26%;
}

.staff-bulk-table th:nth-child(5),
.staff-bulk-table td:nth-child(5) {
    width: 18%;
}

.staff-bulk-table th:nth-child(6),
.staff-bulk-table td:nth-child(6) {
    width: 2.35rem;
}

.staff-bulk-role-cell {
    overflow: hidden;
    vertical-align: middle;
}

.staff-bulk-row-role-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-top: 0;
    font-size: 0.68rem;
    padding: 0.12rem 0.2rem;
    line-height: 1.2;
}

.staff-bulk-table td .staff-new-user-input {
    margin-top: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.72rem;
    padding: 0.22rem 0.32rem;
    line-height: 1.2;
}

.staff-bulk-table tr.staff-bulk-row-invalid td {
    background: rgba(254, 226, 226, 0.42);
}

.staff-bulk-table .staff-new-user-input.staff-bulk-input-invalid {
    border-color: #b91c1c !important;
    background: #fff5f5;
    box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.2);
}

.staff-bulk-un-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 720px) {
    .staff-bulk-table th:nth-child(4),
    .staff-bulk-table td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 520px) {
    .staff-bulk-table th:nth-child(2),
    .staff-bulk-table td:nth-child(2) {
        display: none;
    }
}

.staff-bulk-slug-btn {
    flex: 0 0 auto;
    padding: 0.18rem 0.32rem;
    font-size: 0.65rem;
    border: 1px solid #64748b;
    border-radius: 4px;
    background: #f1f5f9;
    cursor: pointer;
    font-family: inherit;
}

.staff-bulk-slug-btn:hover {
    background: #e2e8f0;
}

.staff-bulk-row-actions {
    width: 2.5rem;
    text-align: center;
}

.staff-bulk-remove {
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.08rem 0.25rem;
    border-radius: 4px;
}

.staff-bulk-remove:hover {
    background: #fee2e2;
}

.staff-bulk-submit-wrap {
    margin-top: 1rem;
}

.language-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lang-link {
    padding: 5px 12px;
    border: 1px solid var(--text-color2);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color2);
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tryggja að fánarnir birtist í öllum vöfrum */
.lang-link .flag-icon {
    display: inline-block !important;
    font-size: 18px !important;
    line-height: 1 !important;
    margin-right: 4px !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Twemoji Mozilla", "EmojiOne Color", sans-serif !important;
    vertical-align: middle !important;
    min-width: 20px !important;
    text-align: center !important;
    /* Force emoji rendering */
    -webkit-font-feature-settings: "liga" 1, "calt" 1 !important;
    font-feature-settings: "liga" 1, "calt" 1 !important;
    text-rendering: optimizeLegibility !important;
    font-variant-emoji: emoji !important;
}

/* Fánarnir eru settir beint með JavaScript - ekki þörf á CSS ::before fallback */

.lang-link:hover {
    background-color: var(--text-color2);
    color: var(--background1);
}

.lang-link.active {
    background: linear-gradient(135deg, #0061ff, #60efff);
    color: white;
    border-color: #0061ff;
    box-shadow: 0 2px 8px rgba(0, 97, 255, 0.3);
}

/* Aðeins hringlaga fánar — sjálfstæðir hringir (~1,5× 20px töflu), ekki rammar */
.language-switcher--icon-only .lang-link {
    box-sizing: border-box;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    justify-content: center;
    align-items: center;
    gap: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.language-switcher--icon-only .lang-link .flag-icon {
    margin-right: 0 !important;
    min-width: 0 !important;
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0 !important;
}

.language-switcher--icon-only .lang-link .flag-icon--svg {
    display: flex !important;
    line-height: 0 !important;
}

.language-switcher--icon-only .lang-flag-svg {
    display: block !important;
    width: 100%;
    height: 100%;
    max-width: none !important;
    border-radius: 50%;
    object-fit: cover;
}

.header-line {
    padding-top: 10px;
    width: calc(100% + 40px); /* Extend beyond header padding to match top-bar */
    margin-left: -20px; /* Compensate for header padding */
    margin-right: -20px; /* Compensate for header padding */
    padding-left: 0;
    padding-right: 0;
    background: linear-gradient(to right, #ffffff, #888888);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    margin-top: 0;
    margin-bottom: 1rem;
    /* Now header-line extends to full width minus 40px (20px on each side) */
    /* Top-bar has margin-left: 20px and margin-right: 20px, so it's also 100% - 40px wide */
    /* They should align perfectly */
}

h1:not(.staff-portal-header-title),
h2,
h3 {
    color: var(--text-color2);
}

h1:not(.staff-portal-header-title) {
    font-size: 28px;
}

.top-bar h2 {
    color: var(--text-color1);
}

.container {
    width: 90%;
}

.efni {
    width: 90%;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background2);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Fyrstu skráning ofurkerfisstjóra — jaðar og hnappur með jákvæðum tón */
.admin-bootstrap-page .admin-bootstrap-efni {
    max-width: min(40rem, 96vw);
    padding: 1.5rem 1.25rem 2rem;
    border: 1px solid rgba(6, 214, 160, 0.28);
    box-shadow: 0 4px 24px rgba(6, 214, 160, 0.08), 0 2px 8px rgba(0, 0, 0, 0.35);
}

.admin-bootstrap-intro {
    max-width: 36rem;
    margin: 0 auto 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 8px;
    border-left: 4px solid var(--success-message);
    background: linear-gradient(
        105deg,
        rgba(6, 214, 160, 0.14) 0%,
        rgba(237, 242, 244, 0.06) 55%,
        transparent 100%
    );
}

.admin-bootstrap-intro-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color1);
    font-style: normal;
}

.admin-bootstrap-fieldset {
    border-radius: 10px;
    border: 1px solid rgba(141, 153, 174, 0.35);
    padding: 1.25rem 1.5rem 1.5rem;
    background: rgba(237, 242, 244, 0.04);
}

.admin-bootstrap-legend {
    padding: 0 0.5rem;
    color: var(--success-message);
    font-weight: 600;
}

.admin-bootstrap-page .in-form label {
    color: var(--text-color1);
}

.admin-bootstrap-page input[type="text"],
.admin-bootstrap-page input[type="email"],
.admin-bootstrap-page input[type="password"] {
    border: 1px solid rgba(141, 153, 174, 0.45);
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.admin-bootstrap-page input[type="text"]:focus,
.admin-bootstrap-page input[type="email"]:focus,
.admin-bootstrap-page input[type="password"]:focus {
    outline: none;
    border-color: var(--success-message);
    box-shadow: 0 0 0 2px rgba(6, 214, 160, 0.25);
}

.admin-bootstrap-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.admin-bootstrap-submit {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    color: var(--background1);
    background: linear-gradient(180deg, #3dd9b1 0%, var(--success-message) 100%);
    box-shadow: 0 2px 8px rgba(6, 214, 160, 0.35);
    transition: filter 0.2s ease, transform 0.15s ease;
}

.admin-bootstrap-submit:hover {
    filter: brightness(1.08);
}

.admin-bootstrap-submit:active {
    transform: translateY(1px);
}

.form {
    display: flex;
    justify-content: center;
}

/* Innskráning: „Gleymt lykilorð?“ — rólegur rauðleitur, lesanlegur á dökkum bakgrunni (ekki :visited fjólublár) */
.login-page .login-forgot-row {
    max-width: 20rem;
    margin: 0 auto 0.75rem;
    text-align: right;
    font-size: 0.9rem;
}

.login-page .login-forgot-link,
.login-page .login-forgot-link:link,
.login-page .login-forgot-link:visited {
    color: #dd9a9a;
    text-decoration: none;
    font-weight: 600;
}

.login-page .login-forgot-link:hover {
    color: #f0c4c4;
    text-decoration: underline;
    text-decoration-color: rgba(240, 196, 196, 0.75);
    text-underline-offset: 0.12em;
}

.login-page .login-forgot-link:focus-visible {
    outline: 2px solid #e8b4b4;
    outline-offset: 3px;
    border-radius: 4px;
}

.in-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

legend {
    font-size: 24px;
}

label {
    font-size: 18px;
}

input[type="text"], input[type="password"], input[type="email"] {
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: none;
    background-color: #fff;
    color: #000;
    min-width: 450px;
}

label {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color2);
}

label.consent-checkbox,
label.consent-checkbox * {
    font-size: 24px !important;
}

.form-note {
    font-size: 14px;
    color: #3c0d32;
    font-style: italic;
    margin-top: 5px;
}

#typedName {
    min-width: 450px;
}

.signature-button {
    padding: 10px 20px;
    font-size: 24px;
    background-color: var( --background2);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.new-client-actions {
    display: flex;
    justify-content: space-between;
}

.action-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.action-button:hover {
    background-color: #666;
}

.error-message {
    color: var(--error-message);
    font-size: 20px;
}

.alert {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
}

.alert-danger {
    background: rgba(127, 29, 29, 0.88);
    border: 1px solid rgba(248, 113, 113, 0.68);
    color: #fee2e2;
}

.alert-success {
    background: rgba(6, 78, 59, 0.9);
    border: 1px solid rgba(52, 211, 153, 0.72);
    color: #ecfdf5;
}

.alert-warning {
    background-color: rgba(255, 209, 102, 0.1);
    border: 1px solid var(--warning-message);
    color: var(--warning-message);
}

.questionnaires-flash {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.questionnaires-flash--ok {
    background: rgba(6, 78, 59, 0.9);
    border: 1px solid rgba(52, 211, 153, 0.72);
    color: #ecfdf5;
}

.questionnaires-flash--err {
    background: rgba(127, 29, 29, 0.88);
    border: 1px solid rgba(248, 113, 113, 0.68);
    color: #fee2e2;
}

.questionnaires-flash--info {
    background: rgba(120, 53, 15, 0.88);
    border: 1px solid rgba(251, 191, 36, 0.72);
    color: #fffbeb;
}

html[data-theme="light"] .questionnaires-flash--info {
    background: #fff8e6;
    border: 1px solid #d97706;
    color: #78350f;
}

.app-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.app-modal-root--open {
    display: block;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(2px);
}

.app-modal-dialog {
    position: relative;
    width: min(32rem, calc(100vw - 2rem));
    margin: 12vh auto 0;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.55);
    padding: 1rem 1rem 0.9rem;
}

.app-modal-title {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    color: #f8fafc;
}

.app-modal-title:empty {
    display: none;
}

.app-modal-message {
    margin: 0 0 0.9rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.app-modal-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.app-modal-input-wrap[hidden] {
    display: none !important;
}

.app-modal-input-label {
    font-size: 0.86rem;
    color: #cbd5e1;
}

.app-modal-input {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
}

#signature-pad {
    touch-action: none; /* Mjög mikilvægt fyrir spjaldtölvur */
    border: 1px solid #ccc;
    width: 100%;
    height: 200px;
}

@media (max-width: 1024px) {
    body {
        font-size: 18px;
    }
}

/* Multiple clients list styles */
.multiple-clients-found {
    text-align: center;
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.client-item {
    background-color: var(--background2);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.client-item:hover {
    background-color: #3a3c52;
    border-color: var(--success-message);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.client-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-color1);
    margin-bottom: 5px;
}

.client-ssn {
    font-size: 14px;
    color: var(--text-color2);
    margin-bottom: 3px;
}

.client-email {
    font-size: 14px;
    color: var(--success-message);
}

.client-status {
    margin-top: 8px;
}

.client-status .status-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Status badge colors */
.status-expired {
    background-color: #dc3545;
    color: white;
}

.status-revoked {
    background-color: #6c757d;
    color: white;
}

.status-confirmed {
    background-color: #28a745;
    color: white;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

/* Date picker dialog styles */
.date-picker-dialog {
    background-color: #ffffff !important;
    border: 2px solid #28a745 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    color: #212529 !important;
}

.date-picker-dialog p {
    color: #212529 !important;
    font-weight: 500 !important;
    margin: 0 0 15px 0 !important;
}

.date-picker-dialog input[type="date"] {
    width: 100% !important;
    padding: 10px !important;
    border: 2px solid #28a745 !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    color: #212529 !important;
}

.date-picker-dialog input[type="date"]:focus {
    outline: none !important;
    border-color: #1e7e34 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25) !important;
}

.date-picker-dialog button {
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    margin: 0 5px !important;
}

.date-picker-dialog button:hover {
    background-color: #1e7e34 !important;
}

.date-picker-dialog button:last-child {
    background-color: #6c757d !important;
}

.date-picker-dialog button:last-child:hover {
    background-color: #5a6268 !important;
}

/* Confirmation dialog styles */
.confirmation-dialog {
    background-color: #ffffff !important;
    border: 2px solid #dc3545 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    color: #212529 !important;
}

.confirmation-dialog p {
    color: #212529 !important;
    font-weight: 500 !important;
    margin: 0 0 15px 0 !important;
}

.confirmation-dialog button {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    margin: 0 5px !important;
}

.confirmation-dialog button:hover {
    background-color: #c82333 !important;
}

.confirmation-dialog button:last-child {
    background-color: #6c757d !important;
}

.confirmation-dialog button:last-child:hover {
    background-color: #5a6268 !important;
}

/* @media stillingar fyrir confirmation dialog */
@media (max-width: 768px) {
    .confirmation-dialog {
        max-width: 90% !important;
        margin: 20px !important;
        padding: 15px !important;
    }
    
    .confirmation-dialog p {
        font-size: 14px !important;
    }
    
    .confirmation-dialog button {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .confirmation-dialog {
        max-width: 95% !important;
        margin: 10px !important;
        padding: 12px !important;
    }
    
    .confirmation-dialog p {
        font-size: 13px !important;
    }
    
    .confirmation-dialog button {
        padding: 6px 12px !important;
        font-size: 13px !important;
        margin: 5px !important;
    }
}

/* Date picker dialog styles */
.date-picker-dialog {
    background-color: #ffffff !important;
    border: 2px solid #28a745 !important;
    color: #333 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    min-width: 450px !important;
    max-width: 500px !important;
}

.date-picker-dialog p {
    color: #333 !important;
    font-weight: 500;
    font-size: 18px !important;
}

.date-picker-dialog input[type="date"] {
    border: 2px solid #28a745 !important;
    background-color: #ffffff !important;
    color: #333 !important;
    font-size: 18px !important;
    padding: 12px !important;
    width: 200px !important;
    text-align: center !important;
}

.date-picker-dialog button {
    font-weight: 500;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.date-picker-dialog button[onclick="confirmDateAction()"] {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: none !important;
    margin: 0 15px !important;
}

.date-picker-dialog button[onclick="confirmDateAction()"]:hover {
    background-color: #218838 !important;
}

.date-picker-dialog button[onclick="cancelDateAction()"] {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border: none !important;
    align-self: flex-end !important;
}

.date-picker-dialog button[onclick="cancelDateAction()"]:hover {
    background-color: #5a6268 !important;
}

.date-picker-dialog button[onclick="setTodayDate()"] {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
    align-self: flex-start !important;
}

.date-picker-dialog button[onclick="setTodayDate()"]:hover {
    background-color: #5a6268 !important;
}

/* @media stillingar fyrir date picker dialog */
@media (max-width: 768px) {
    .date-picker-dialog {
        max-width: 90% !important;
        min-width: 300px !important;
        margin: 20px !important;
        padding: 20px !important;
    }
    
    .date-picker-dialog p {
        font-size: 16px !important;
    }
    
    .date-picker-dialog input[type="date"] {
        font-size: 16px !important;
        width: 180px !important;
    }
    
    .date-picker-dialog button {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .date-picker-dialog {
        max-width: 95% !important;
        min-width: 280px !important;
        margin: 10px !important;
        padding: 15px !important;
    }
    
    .date-picker-dialog p {
        font-size: 15px !important;
    }
    
    .date-picker-dialog input[type="date"] {
        font-size: 15px !important;
        width: 160px !important;
    }
    
    .date-picker-dialog button {
        padding: 8px 16px !important;
        font-size: 13px !important;
        margin: 5px !important;
    }
}

/* Sjálfvirk lokun flash — sama og reception.css (síður án reception.css, t.d. numpad/innskráning) */
.staff-flash-fading {
    opacity: 0 !important;
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    border-width: 0 !important;
    pointer-events: none;
    transition:
        opacity 0.45s ease,
        max-height 0.55s ease,
        margin 0.45s ease,
        padding 0.45s ease,
        border-width 0.35s ease;
}
