.sek-app {
    --sek-bg: #f3f4f6;
    --sek-panel: #ffffff;
    --sek-border: #d6d9de;
    --sek-grid: #d9d9d9;
    --sek-text: #1f2937;
    --sek-muted: #6b7280;
    --sek-primary: #255fc8;
    --sek-classic: #55565f;
    --sek-classic-dark: #45464e;
    --sek-paper-grid: #d3d5d8;
    color: var(--sek-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 760px;
    line-height: 1.4;
    overflow-anchor: none;
}

.sek-app.is-initializing > .sek-workspace {
    visibility: hidden;
}

.sek-app *,
.sek-app *::before,
.sek-app *::after {
    box-sizing: border-box;
}

.sek-app [hidden] {
    display: none !important;
}

.sek-app button,
.sek-app input,
.sek-app select {
    font: inherit;
}

.sek-app input,
.sek-app select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--sek-border);
    background: #fff;
    color: var(--sek-text);
    padding: 7px 10px;
    border-radius: 6px;
}

.sek-app input:focus-visible,
.sek-app select:focus-visible,
.sek-app button:focus-visible {
    outline: 1px solid #6b7280;
    outline-offset: 1px;
    box-shadow: none;
}

.sek-button {
    min-height: 38px;
    border: 1px solid var(--sek-border);
    background: #fff;
    color: var(--sek-text);
    padding: 8px 13px;
    border-radius: 6px;
    font-weight: 650;
    cursor: pointer;
}

.sek-button:hover {
    border-color: #b8c1cd;
    background: #f8fafc;
}

.sek-button-primary {
    border-color: var(--sek-primary);
    background: var(--sek-primary);
    color: #fff;
}

.sek-button-danger {
    border-color: #b42318;
    background: #fff;
    color: #b42318;
}

.sek-button-danger:hover:not(:disabled) {
    border-color: #912018;
    background: #fff4f2;
}

.sek-app button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.sek-muted {
    color: var(--sek-muted);
}

.sek-eyebrow {
    color: var(--sek-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.sek-status {
    width: 100%;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    line-height: 1.3;
}

.sek-status[data-type="error"] {
    border-color: #e8b3b3;
    background: #fff5f5;
    color: #8a1c1c;
}

.sek-document-notification-slot {
    flex: 0 0 52px;
    height: 52px;
    padding: 6px 16px 8px;
    overflow: hidden;
}

.sek-document-notification-slot .sek-status {
    max-height: 38px;
    overflow: hidden;
}

/* Project access is modal-only; the Desktop workspace always remains visible. */

/* Classic desktop shell */
.sek-workspace {
    position: relative;
    left: 50%;
    width: min(calc(100vw - 16px), 1712px);
    max-width: 1712px;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #eef0f3;
    box-shadow: 0 22px 55px rgb(15 23 42 / 8%);
}

.sek-workspace-grid {
    display: grid;
    grid-template-columns: minmax(455px, 35%) minmax(0, 65%);
    min-height: 760px;
}

.sek-left-panel,
.sek-document-panel {
    min-width: 0;
}

.sek-left-panel {
    display: flex;
    flex-direction: column;
    background: #f7f8fa;
    border-right: 8px solid #eef0f3;
}

.sek-project-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 54px;
    align-items: center;
    padding: 10px 12px 8px;
    color: #62656c;
    font-size: 12px;
}

.sek-project-summary > span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border: 1px solid #e1e2e5;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 6px rgb(15 23 42 / 7%);
    white-space: nowrap;
}

.sek-project-summary strong {
    color: #4b4d53;
    font-weight: 700;
}

.sek-table-scroll {
    position: relative;
    flex: 1;
    min-height: 610px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 12px;
}

.sek-apartment-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
    font-size: 13px;
}

.sek-apartment-table th,
.sek-apartment-table td {
    height: 24px;
    border: 1px solid var(--sek-grid);
    padding: 2px 4px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.sek-apartment-table th {
    height: 30px;
    background: #f0f0f0;
    color: #202124;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.15;
    white-space: normal;
    user-select: none;
}

.sek-apartment-table th:nth-child(1) { width: 8%; }
.sek-apartment-table th:nth-child(2) { width: 11%; }
.sek-apartment-table th:nth-child(3) { width: 12%; }
.sek-apartment-table th:nth-child(4) { width: 20%; }
.sek-apartment-table th:nth-child(5) { width: 19%; }
.sek-apartment-table th:nth-child(6) { width: 30%; }

.sek-existing-row,
.sek-draft-row {
    cursor: default;
    user-select: none;
}


.sek-existing-row.is-selected td {
    background: #fff;
}

.sek-result-cell {
    font-weight: 700;
}

.sek-file-cell,
.sek-sheet-cell {
    position: relative;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

.sek-sheet-cell:focus {
    outline: none;
}

.sek-sheet-cell.is-cell-selected {
    background: #fff;
}

.sek-sheet-selection-overlay {
    position: absolute;
    z-index: 8;
    box-sizing: border-box;
    border: 1px solid #111;
    pointer-events: none;
}

.sek-sheet-selection-overlay[hidden] {
    display: none;
}

.sek-apartment-table th.is-selection-axis,
.sek-file-cell.is-selection-axis {
    background: #dcdcdc;
}

.sek-sheet-cell.is-range-selected {
    background: #f2f2f2;
}

.sek-sheet-cell.is-range-anchor {
    background: #fff;
}

/* One overlay draws the complete active-range outline. The internal grid
   remains light grey and border-collapse can no longer hide top/left edges. */

.sek-sheet-cell.is-editing {
    padding: 0;
    overflow: visible;
    user-select: text;
    -webkit-user-select: text;
}

.sek-app .sek-cell-editor {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 3px;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 23px;
    text-align: center;
    user-select: text;
    -webkit-user-select: text;
}

.sek-app .sek-cell-editor:focus {
    outline: 0;
    box-shadow: none;
}

.sek-existing-row.is-saving td,
.sek-draft-row.is-saving td {
    opacity: .72;
}

.sek-left-command-area {
    padding: 18px 14px 16px;
    background: #f7f8fa;
}

.sek-grid-clear-row {
    display: flex;
    margin-bottom: 9px;
}

.sek-grid-clear-row .sek-classic-button--icon {
    min-width: 134px;
}

.sek-project-picker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.sek-project-picker {
    min-width: 150px;
    flex: 1 1 150px;
    justify-content: flex-start;
    padding-right: 12px;
}

.sek-project-picker .sek-project-picker-chevron {
    margin-left: auto;
}

.sek-project-picker-label {
    white-space: nowrap;
}

.sek-project-picker-chevron {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    align-items: center;
    justify-content: center;
}

.sek-project-picker-chevron svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sek-project-picker select {
    position: absolute !important;
    inset: 0;
    z-index: 3 !important;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.sek-project-picker select:disabled {
    pointer-events: none;
}

.sek-project-picker:focus-within {
    outline: 1px solid #1f2126;
    outline-offset: 2px;
}

.sek-classic-button {
    position: relative;
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    border: 1px solid #3e4148;
    border-radius: 5px;
    background: linear-gradient(180deg, #777a83 0%, #696c75 10%, #565961 52%, #41434b 100%);
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 42%),
        inset 0 -1px 0 rgb(0 0 0 / 35%),
        0 2px 2px rgb(15 23 42 / 22%),
        0 5px 10px rgb(15 23 42 / 20%);
    color: #fff;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 1px 1px rgb(0 0 0 / 48%);
}

.sek-classic-button::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto;
    height: 46%;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, rgb(255 255 255 / 14%), rgb(255 255 255 / 2%));
    pointer-events: none;
}

.sek-classic-button > * {
    position: relative;
    z-index: 1;
}

.sek-classic-button:hover {
    background: linear-gradient(180deg, #7d8089 0%, #6d7079 10%, #595c64 52%, #44464e 100%);
}

.sek-classic-button:active {
    background: linear-gradient(180deg, #555861 0%, #4b4e56 55%, #3d3f46 100%);
    box-shadow:
        inset 0 2px 5px rgb(0 0 0 / 32%),
        inset 0 1px 0 rgb(255 255 255 / 8%),
        0 1px 2px rgb(15 23 42 / 18%);
}

.sek-classic-button--quiet {
    color: #f7f7f8;
}

.sek-classic-button--icon {
    white-space: nowrap;
}

.sek-button-icon {
    display: inline-flex;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    align-items: center;
    justify-content: center;
}

.sek-button-icon svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sek-project-picker-row .sek-classic-button--icon {
    min-width: 134px;
}

.sek-spreadsheet-hint {
    margin: 16px 0 0;
    color: #72767e;
    font-size: 13px;
    line-height: 1.45;
}

.sek-row-summary {
    display: block;
    margin-top: 8px;
    font-size: 11px;
}

.sek-document-panel {
    position: relative;
    display: flex;
    min-height: 760px;
    flex-direction: column;
    background: #eef0f3;
}

.sek-empty-activity-picker {
    display: grid;
    width: min(320px, 86vw);
    gap: 6px;
    margin: 22px auto 0;
    text-align: left;
}

.sek-empty-activity-picker > span:first-child {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.sek-empty-activity-slot {
    display: block;
}

.sek-document-empty .sek-activity-select {
    position: static;
    width: 100%;
    min-height: 36px;
    padding: 5px 28px 5px 8px;
    border: 1px solid #cbd1d8 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 12px;
    appearance: auto;
    cursor: pointer;
}

.sek-document-empty {
    flex: 1;
    display: grid;
    min-height: 680px;
    place-items: center;
    text-align: center;
    color: var(--sek-muted);
}

.sek-empty-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    font-size: 28px;
}

.sek-document {
    display: flex;
    min-height: 706px;
    flex: 1;
    flex-direction: column;
}

.sek-preview-stage {
    flex: 1;
    padding: 12px 16px 8px;
    overflow: auto;
}

.sek-live-document {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 780px;
    aspect-ratio: 297 / 210;
    margin: 0 auto;
    padding: 14px 20px 22px;
    flex-direction: column;
    border: 0;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.25;
}

.sek-paper-header {
    position: relative;
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 74px;
    align-items: center;
    gap: 16px;
    margin-bottom: 6px;
}

.sek-paper-logo {
    position: relative;
    top: -8px;
    display: grid;
    width: 180px;
    height: 70px;
    place-items: center;
    overflow: hidden;
    background: transparent;
    color: #555;
    font-size: 10px;
}

.sek-paper-logo img {
    display: block;
    max-width: 170px;
    max-height: 62px;
    object-fit: contain;
}

.sek-paper-header h2 {
    position: absolute;
    left: 0;
    right: 0;
    top: 55%;
    margin: 0;
    transform: translateY(-50%);
    text-align: center;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
}

.sek-paper-header-spacer {
    display: none;
}

.sek-paper-meta {
    position: relative;
    display: grid;
    grid-template-columns: 12.5% 37.5% 12.5% 37.5%;
    margin-bottom: 12px;
    border-top: 1px solid #222;
    border-left: 1px solid #222;
}

.sek-paper-meta > * {
    min-height: 23px;
    padding: 4px 6px;
    border-right: 1px solid #222;
    border-bottom: 1px solid #222;
    overflow: hidden;
    box-sizing: border-box;
    font-size: 11.5px;
    line-height: 1.2;
}

.sek-paper-meta strong {
    background: #e3e3e3;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.sek-paper-meta > span {
    background: #fff;
}

.sek-paper-activity-value {
    position: relative;
    padding: 4px 6px !important;
    overflow: visible !important;
}

.sek-activity-text {
    display: block;
    min-height: 15px;
    padding-right: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
    pointer-events: none;
}

.sek-paper-activity-value::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.sek-paper-activity-value .sek-activity-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: transparent !important;
    font: inherit;
    outline: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.sek-paper-activity-value .sek-activity-select option {
    color: #111 !important;
    background: #fff !important;
}

.sek-paper-activity-value .sek-activity-select:focus,
.sek-paper-activity-value .sek-activity-select:active {
    border: 0 !important;
    background: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.sek-editor-table-scroll {
    width: 100%;
    overflow: hidden;
}

.sek-editor-table {
    width: 100%;
    min-width: 0;
    margin-bottom: 12px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.sek-editor-table th,
.sek-editor-table td {
    height: 42px;
    min-width: 0;
    padding: 4px 5px;
    border: 1px solid var(--sek-paper-grid);
    box-sizing: border-box;
    overflow-wrap: break-word;
    text-align: center;
    vertical-align: middle;
}

.sek-editor-table tbody tr {
    height: 42px;
}

.sek-editor-table tbody td:nth-child(2),
.sek-editor-table tbody td:nth-child(3) {
    text-align: left;
}

.sek-editor-table th {
    height: 32px;
    padding: 3px 3px;
    overflow: hidden;
    background: #d6d6d6;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.06;
    white-space: nowrap;
}


/* Desktop preview follows the proven proportions from the old Egenkontroll UX. */
.sek-editor-table th:nth-child(1) { width: 3.1%; }
.sek-editor-table th:nth-child(2) { width: 12.8%; }
.sek-editor-table th:nth-child(3) { width: 27.1%; }
.sek-editor-table th:nth-child(4) { width: 6.1%; }
.sek-editor-table th:nth-child(5) { width: 8.3%; }
.sek-editor-table th:nth-child(6) { width: 6.0%; }
.sek-editor-table th:nth-child(7) { width: 17.2%; }
.sek-editor-table th:nth-child(8) { width: 12.1%; }
.sek-editor-table th:nth-child(9) { width: 7.3%; }

.sek-editor-table input[type="text"],
.sek-editor-table input[type="date"] {
    width: 100%;
    min-height: 24px;
    padding: 2px 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}

.sek-editor-table input[type="checkbox"] {
    width: 11px;
    min-height: 11px;
    height: 11px;
    margin: 0;
}

.sek-sign-cell {
    padding: 2px 4px !important;
}

.sek-signature-preview {
    display: block;
    width: 100%;
    max-width: 90px;
    max-height: 30px;
    margin: 0 auto;
    object-fit: contain;
}

.sek-company-footer {
    display: grid;
    grid-template-columns: 1.4fr 2fr 1fr;
    margin-top: auto;
    border-top: 1px solid var(--sek-paper-grid);
    border-left: 1px solid var(--sek-paper-grid);
}

.sek-company-footer > div {
    display: grid;
    min-height: 48px;
    gap: 5px;
    padding: 6px 8px;
    border-right: 1px solid var(--sek-paper-grid);
    border-bottom: 1px solid var(--sek-paper-grid);
    box-sizing: border-box;
    font-size: 13px;
}

.sek-company-footer strong {
    font-size: 13px;
    font-weight: 700;
}

.sek-preview-actions {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 18px 14px;
}

.sek-preview-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.sek-preview-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sek-preview-action-row .sek-classic-button {
    width: 184px;
}

.sek-current-file {
    min-width: 42px;
    text-align: center;
    color: #111827;
    font-size: 32px;
    font-weight: 850;
    line-height: 1;
}


/* Guest preview stays visible until a project/account is opened. */
.sek-workspace.is-guest .sek-table-scroll,
.sek-workspace.is-guest .sek-preview-stage {
    pointer-events: none;
    user-select: none;
}

.sek-workspace.is-guest .sek-preview-action-buttons .sek-classic-button:disabled {
    opacity: .62;
}

/* Project/account access overlays the existing Egenkontroll instead of replacing it. */
.sek-access-modal {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: grid;
    place-items: center;
    padding: 28px;
}

.sek-access-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(31 41 55 / 52%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: default;
}

.sek-access-dialog {
    position: relative;
    z-index: 1;
    width: min(630px, calc(100vw - 44px));
    padding: 34px 36px 32px;
    border: 1px solid #d5d9df;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 60px rgb(15 23 42 / 28%);
    color: #1f2937;
}

.sek-access-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.sek-access-dialog__header h2 {
    margin: 0 0 7px;
    color: #1f2937;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}

.sek-access-dialog__header p {
    margin: 0;
    color: #737b89;
    font-size: 18px;
    line-height: 1.35;
}

.sek-access-dialog__close {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    margin-top: -14px;
    margin-right: -16px;
    border: 1px solid #d1d7df;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.sek-access-dialog__close:hover {
    background: #f8fafc;
}

.sek-login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: -4px 0 24px;
    border: 1px solid #cfd5dd;
    border-radius: 10px;
    overflow: hidden;
    background: #f4f6f8;
}

.sek-login-tab {
    min-height: 54px;
    padding: 10px 16px;
    border: 0;
    border-right: 1px solid #cfd5dd;
    background: transparent;
    color: #596273;
    font-size: 16px;
    font-weight: 750;
    cursor: pointer;
}

.sek-login-tab:last-child {
    border-right: 0;
}

.sek-login-tab.is-active {
    background: #fff;
    color: #1f2937;
    box-shadow: inset 0 -3px 0 #2563eb;
}

.sek-login-tab:focus-visible {
    position: relative;
    z-index: 1;
    outline: 1px solid #6b7280;
    outline-offset: -2px;
}

.sek-login-panel[hidden] {
    display: none;
}

.sek-access-form {
    display: grid;
    gap: 19px;
}

.sek-access-form label {
    display: grid;
    gap: 8px;
}

.sek-access-form label > span {
    color: #202938;
    font-size: 17px;
    font-weight: 700;
}

.sek-app .sek-access-form input {
    width: 100%;
    height: 64px;
    min-height: 64px;
    padding: 9px 13px;
    border: 1px solid #29303b;
    border-radius: 0;
    background: #fff;
    color: #111827;
    font-size: 18px;
    box-shadow: none;
}

.sek-app .sek-access-form input:focus {
    outline: 1px solid #111827;
    outline-offset: 0;
    box-shadow: none;
}

.sek-access-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 5px;
}

.sek-access-primary,
.sek-access-secondary {
    min-height: 60px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 750;
    cursor: pointer;
}

.sek-access-primary {
    border: 1px solid #565861;
    background: #595b64;
    color: #fff;
}

.sek-access-primary:hover {
    background: #51535b;
}

.sek-access-secondary {
    border: 1px solid #4b4e56;
    background: #fff;
    color: #565862;
}

.sek-access-secondary:hover {
    background: #fafafa;
}

.sek-access-dialog__status-slot {
    min-height: 0;
    margin-top: 12px;
}

.sek-access-dialog__status-slot:has(.sek-status:not([hidden])) {
    min-height: 38px;
}

.sek-access-placeholder-note {
    margin: 12px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.sek-signature-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.sek-signature-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(15 23 42 / 48%);
    cursor: default;
}

.sek-signature-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(460px, 100%);
    gap: 14px;
    padding: 22px;
    border: 1px solid #cfd5dc;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}

.sek-signature-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sek-signature-dialog__header strong {
    font-size: 20px;
}

.sek-signature-dialog__close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--sek-border);
    border-radius: 50%;
    background: #fff;
    color: var(--sek-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.sek-signature-dialog label {
    display: grid;
    gap: 6px;
}

.sek-signature-dialog label > span {
    color: #475569;
    font-size: 12px;
    font-weight: 750;
}

.sek-signature-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}



.sek-document-scope {
    display: inline-flex;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 5px 8px;
    flex: 0 0 auto;
    flex-direction: column;
    align-self: center;
    gap: 1px;
    border: 1px solid #d8dde4;
    border-radius: 6px;
    background: #fff;
    color: #334155;
}

.sek-document-scope__option {
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.sek-app .sek-document-scope__option input[type="checkbox"] {
    width: 13px;
    min-height: 13px;
    height: 13px;
    margin: 0;
    padding: 0;
    flex: 0 0 13px;
    border-radius: 2px;
    box-shadow: none;
}

.sek-app .sek-document-scope__option input[type="checkbox"]:focus,
.sek-app .sek-document-scope__option input[type="checkbox"]:focus-visible {
    outline: 0;
    border-color: #6b7280;
    box-shadow: none;
}

.sek-document-scope__option input:disabled {
    cursor: not-allowed;
}

.sek-document-scope p {
    margin: 0 0 0 19px;
    color: #6b7280;
    font-size: 9.5px;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .sek-workspace-grid {
        grid-template-columns: minmax(410px, 39%) minmax(0, 61%);
    }

    .sek-project-summary {
        gap: 5px 14px;
        font-size: 11px;
    }

    .sek-apartment-table,
    .sek-cell-editor {
        font-size: 10.5px;
    }

    .sek-apartment-table th {
        font-size: 10px;
    }

    .sek-left-panel {
        border-right-width: 6px;
    }

    .sek-live-document {
        padding: 12px 16px 18px;
        font-size: 10.5px;
    }

    .sek-paper-header {
        grid-template-columns: 150px 1fr;
        min-height: 60px;
    }

    .sek-paper-logo {
        width: 150px;
        height: 60px;
    }

    .sek-paper-logo img {
        max-width: 142px;
        max-height: 52px;
    }

    .sek-paper-header h2 {
        font-size: 18px;
    }

    .sek-paper-meta > *,
    .sek-editor-table,
    .sek-editor-table th,
    .sek-editor-table input[type="text"],
    .sek-editor-table input[type="date"] {
        font-size: 10.5px;
    }

    .sek-editor-table th,
    .sek-editor-table td {
        height: 40px;
        padding: 3px 4px;
    }
}

@media (max-width: 960px) {
    .sek-workspace {
        left: auto;
        width: 100%;
        margin: 0 auto;
        transform: none;
    }

    .sek-workspace-grid {
        grid-template-columns: 1fr;
    }

    .sek-left-panel {
        border-right: 0;
        border-bottom: 8px solid #eef0f3;
    }

    .sek-table-scroll {
        min-height: 500px;
    }

    .sek-document-panel {
        min-height: 700px;
    }

}

@media (max-width: 640px) {
    .sek-project-picker-row > * {
        flex: 1 1 100%;
    }

    .sek-access-modal {
        padding: 14px;
    }

    .sek-access-dialog {
        width: 100%;
        padding: 26px 22px 24px;
        border-radius: 20px;
    }

    .sek-access-dialog__header h2 {
        font-size: 27px;
    }

    .sek-access-dialog__header p {
        font-size: 16px;
    }

    .sek-login-tabs {
        grid-template-columns: 1fr;
    }

    .sek-login-tab {
        border-right: 0;
        border-bottom: 1px solid #cfd5dd;
    }

    .sek-login-tab:last-child {
        border-bottom: 0;
    }

    .sek-access-dialog__actions {
        grid-template-columns: 1fr;
    }

    .sek-preview-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sek-current-file {
        align-self: flex-end;
    }


    .sek-paper-meta {
        grid-template-columns: 22% 28% 22% 28%;
    }
}

/* 0.10.4 account-first customer dashboard */
html.sek-access-open,
html.sek-customer-open {
    overflow: hidden;
}

.sek-access-dialog--wide {
    width: min(860px, calc(100vw - 44px));
}

.sek-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.sek-product-card {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #d7dde6;
    border-radius: 18px;
    background: #f8fafc;
}

.sek-product-card__eyebrow,
.sek-customer-eyebrow,
.sek-customer-template-scope {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sek-product-card h3 {
    margin: 12px 0 8px;
    color: #152033;
    font-size: 25px;
}

.sek-product-card p {
    flex: 1;
    margin: 0 0 24px;
    color: #647084;
    line-height: 1.55;
}

.sek-customer-modal,
.sek-customer-editor {
    position: fixed;
    inset: 0;
    z-index: 10950;
    display: grid;
    place-items: center;
    padding: 24px;
}

.sek-customer-editor {
    z-index: 11100;
}

.sek-customer-modal__backdrop,
.sek-customer-editor__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(25 35 50 / 58%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.sek-customer-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(1220px, calc(100vw - 64px));
    height: min(780px, calc(100vh - 80px));
    min-height: 560px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9dfe7;
    border-radius: 18px;
    background: #f4f6f9;
    box-shadow: 0 32px 90px rgb(15 23 42 / 35%);
    color: #172033;
}

.sek-customer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 22px 14px;
    border-bottom: 1px solid #dbe1e9;
    background: #fff;
}

.sek-customer-header h2 {
    margin: 4px 0 3px;
    font-size: 25px;
    line-height: 1.1;
}

.sek-customer-header p {
    margin: 0;
    color: #6d788a;
    font-size: 14px;
}

.sek-customer-close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #d2d9e2;
    border-radius: 50%;
    background: #fff;
    color: #172033;
    font-size: 28px;
    cursor: pointer;
}

.sek-customer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 18px;
    border-bottom: 1px solid #dbe1e9;
    background: #fff;
}

.sek-customer-tabs button {
    min-height: 44px;
    padding: 0 13px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #344155;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.sek-customer-tabs button.is-active {
    border-bottom-color: #2563eb;
    color: #1762d4;
}

.sek-customer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 20px;
    border-bottom: 1px solid #dbe1e9;
    background: #f8fafc;
}

.sek-customer-primary,
.sek-customer-secondary,
.sek-customer-actions button,
.sek-customer-card button,
.sek-customer-subscription-cta button {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #c5cfdd;
    border-radius: 7px;
    background: #fff;
    color: #1f4f9c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.sek-customer-primary,
.sek-customer-subscription-cta button {
    border-color: #1d63c7;
    background: #1768d7;
    color: #fff;
}

.sek-customer-actions button.is-danger,
.sek-access-primary.is-danger {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

.sek-customer-status {
    margin: 10px 20px 0;
    padding: 10px 13px;
    border-left: 4px solid #c72c2c;
    background: #fff0f0;
    color: #8d1d1d;
}

.sek-customer-content {
    flex: 1;
    overflow: auto;
    padding: 17px 20px 22px;
}

.sek-customer-loading,
.sek-customer-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    color: #718096;
}

.sek-customer-section {
    display: grid;
    gap: 14px;
}

.sek-customer-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.sek-customer-section-header h3,
.sek-customer-card h3 {
    margin: 0;
    font-size: 18px;
}

.sek-customer-section-header p {
    margin: 4px 0 0;
    color: #718096;
}

.sek-customer-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
}

.sek-customer-metrics article,
.sek-customer-card,
.sek-customer-template-card,
.sek-customer-license-card {
    border: 1px solid #d9e0e9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(15 23 42 / 4%);
}

.sek-customer-metrics article {
    display: grid;
    gap: 5px;
    padding: 14px 15px;
}

.sek-customer-metrics span {
    color: #69768a;
    font-size: 12px;
    font-weight: 650;
}

.sek-customer-metrics strong {
    font-size: 26px;
}

.sek-customer-grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 13px;
}

.sek-customer-card {
    padding: 15px;
}

.sek-customer-card > header,
.sek-customer-template-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.sek-customer-card > header span {
    color: #778397;
    font-size: 13px;
}

.sek-customer-chart {
    display: flex;
    height: 165px;
    align-items: flex-end;
    gap: 6px;
    padding-top: 10px;
}

.sek-customer-chart-day {
    display: flex;
    min-width: 0;
    height: 100%;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    text-align: center;
}

.sek-customer-chart-day span {
    display: block;
    min-height: 4px;
    border-radius: 5px 5px 2px 2px;
    background: #2b72db;
}

.sek-customer-chart-day small {
    overflow: hidden;
    color: #8a94a4;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sek-customer-project-link {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 2px;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    background: transparent;
    color: inherit;
    text-align: left;
}

.sek-customer-project-link span:first-child {
    display: grid;
    gap: 3px;
}

.sek-customer-project-link small {
    color: #7a8596;
}

.sek-customer-table-scroll {
    overflow: auto;
    border: 1px solid #d8dfe8;
    border-radius: 12px;
    background: #fff;
}

.sek-customer-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.sek-customer-table th,
.sek-customer-table td {
    padding: 10px 11px;
    border-bottom: 1px solid #e3e8ef;
    text-align: left;
    vertical-align: middle;
}

.sek-customer-table th {
    background: #f7f9fb;
    color: #344155;
    font-size: 13px;
}

.sek-customer-table td small {
    display: block;
    margin-top: 4px;
    color: #7a8596;
}

.sek-customer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sek-customer-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef2f6;
    color: #526075;
    font-size: 12px;
    font-weight: 750;
}

.sek-customer-badge[data-status="active"] {
    background: #e3f6e7;
    color: #277a3b;
}

.sek-customer-badge[data-status="archived"],
.sek-customer-badge[data-status="cancelled"] {
    background: #eceff3;
    color: #5d6879;
}

.sek-customer-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sek-customer-template-card {
    padding: 15px;
}

.sek-customer-template-card h3 {
    margin: 5px 0 4px;
    font-size: 18px;
}

.sek-customer-template-card p {
    margin: 0;
    color: #6d788a;
}

.sek-customer-template-card details {
    margin: 10px 0 13px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #f7f9fb;
}

.sek-customer-template-card summary {
    color: #1d5aa5;
    font-weight: 700;
    cursor: pointer;
}

.sek-customer-template-card ol {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 22px;
}

.sek-customer-template-card li span {
    display: block;
    color: #758095;
    font-size: 13px;
}

.sek-customer-license-card {
    padding: 15px;
}

.sek-customer-license-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.sek-customer-license-card dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0;
}

.sek-customer-license-card dl div {
    padding: 9px;
    border-radius: 9px;
    background: #f6f8fb;
}

.sek-customer-license-card dt {
    color: #7a8596;
    font-size: 12px;
}

.sek-customer-license-card dd {
    margin: 5px 0 0;
    font-weight: 700;
}

.sek-customer-subscription-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid #e4e8ee;
}


.sek-customer-plan-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.sek-customer-plan-notice.is-compact {
    padding: 14px 16px;
}

.sek-customer-plan-notice h3 {
    margin: 0 0 4px;
}

.sek-customer-plan-notice p {
    margin: 0;
    color: #718096;
    line-height: 1.5;
}

.sek-customer-plan-link {
    flex: 0 0 auto;
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border: 1px solid #1d63c7;
    border-radius: 8px;
    background: #1768d7;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.sek-customer-plan-link:focus-visible {
    outline: 3px solid rgb(37 99 235 / 28%);
    outline-offset: 2px;
}

.sek-customer-plan-status {
    margin: 12px 0 0;
    color: #5e6a7d;
    line-height: 1.5;
}

.sek-customer-editor-dialog {
    position: relative;
    z-index: 1;
    width: min(850px, calc(100vw - 42px));
    max-height: calc(100vh - 42px);
    overflow: auto;
    padding: 30px;
    border: 1px solid #d5dce5;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgb(15 23 42 / 38%);
}

.sek-customer-form {
    display: grid;
    gap: 17px;
}

.sek-customer-form > label,
.sek-customer-control-row > label {
    display: grid;
    gap: 7px;
}

.sek-customer-form label > span,
.sek-customer-control-row label > span {
    font-weight: 700;
}

.sek-customer-form input,
.sek-customer-form textarea,
.sek-customer-form select,
.sek-customer-control-row input,
.sek-customer-control-row textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #aeb8c5;
    border-radius: 6px;
    background: #fff;
    color: #172033;
    font: inherit;
}

.sek-customer-form textarea,
.sek-customer-control-row textarea {
    min-height: 82px;
    resize: vertical;
}

.sek-customer-control-list {
    display: grid;
    gap: 12px;
}

.sek-customer-control-row {
    display: grid;
    grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr);
    gap: 12px 16px;
    padding: 16px;
    border: 1px solid #d8dfe8;
    border-radius: 12px;
    background: #f8fafc;
}

.sek-customer-control-head {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sek-customer-control-head button {
    min-width: 34px;
    min-height: 32px;
    border: 1px solid #c7d0dc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.sek-customer-control-head button.is-danger {
    color: #b42318;
}

.sek-customer-checkbox {
    display: flex !important;
    grid-column: 1 / -1;
    align-items: center;
    gap: 9px;
}

.sek-customer-checkbox input {
    width: 20px;
    min-height: 20px;
}

.sek-customer-project-checks {
    display: grid;
    gap: 9px;
    max-height: 320px;
    overflow: auto;
}

.sek-customer-project-checks label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px;
    border: 1px solid #dde3eb;
    border-radius: 8px;
}

.sek-customer-project-checks input {
    width: 18px;
    min-height: 18px;
}

@media (max-width: 900px) {
    .sek-product-grid,
    .sek-customer-template-grid,
    .sek-customer-grid-two {
        grid-template-columns: 1fr;
    }

    .sek-customer-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sek-customer-plan-notice {
        align-items: stretch;
        flex-direction: column;
    }

    .sek-customer-plan-link {
        width: 100%;
    }

    .sek-customer-dialog {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        min-height: 0;
        border-radius: 14px;
    }

    .sek-customer-modal,
    .sek-customer-editor {
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .sek-customer-header,
    .sek-customer-content,
    .sek-customer-toolbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sek-customer-tabs {
        padding: 0 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .sek-customer-tabs button {
        flex: 0 0 auto;
    }

    .sek-customer-metrics {
        grid-template-columns: 1fr;
    }

    .sek-customer-control-row {
        grid-template-columns: 1fr;
    }

    .sek-customer-control-head,
    .sek-customer-checkbox {
        grid-column: 1;
    }

    .sek-customer-editor-dialog {
        width: 100%;
        padding: 22px 18px;
    }
}


/* 0.10.4.1 compact account navigation */
.sek-access-dialog--projects {
    width: min(620px, calc(100vw - 44px));
}

.sek-my-projects-list {
    display: grid;
    gap: 8px;
    max-height: min(430px, calc(100vh - 260px));
    overflow: auto;
    padding: 4px 0 12px;
}

.sek-my-project-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid #d9e0e9;
    border-radius: 9px;
    background: #fff;
    color: #172033;
    text-align: left;
    cursor: pointer;
}

.sek-my-project-item:hover,
.sek-my-project-item:focus-visible {
    border-color: #8eb4ec;
    outline: 2px solid transparent;
    background: #f7faff;
}

.sek-my-project-item > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.sek-my-project-item strong,
.sek-my-project-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sek-my-project-item small {
    color: #748095;
}

.sek-my-project-item > span:last-child {
    flex: 0 0 auto;
    color: #1f5eaf;
    font-weight: 700;
}

.sek-my-projects-empty {
    display: grid;
    min-height: 120px;
    place-items: center;
    color: #718096;
}

/* 0.10.4.3 compact activity-template editor */
.sek-customer-editor.is-template-editor .sek-customer-editor-dialog {
    display: flex;
    width: min(760px, calc(100vw - 42px));
    height: min(720px, calc(100vh - 42px));
    overflow: hidden;
    flex-direction: column;
    padding: 24px;
}

.sek-customer-editor.is-template-editor .sek-access-dialog__header {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

.sek-customer-editor.is-template-editor .sek-access-dialog__header h2 {
    margin-bottom: 4px;
    font-size: 26px;
}

.sek-customer-editor.is-template-editor .sek-access-dialog__header p {
    font-size: 14px;
}

.sek-customer-editor.is-template-editor .sek-access-dialog__close {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    margin-top: -8px;
    margin-right: -8px;
}

.sek-customer-editor.is-template-editor [data-sek-customer-editor-body] {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.sek-customer-template-form {
    width: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(120px, 1fr) auto auto;
    gap: 10px;
}

.sek-customer-template-form > label,
.sek-customer-template-form .sek-customer-control-row > label {
    gap: 4px;
}

.sek-customer-template-form input,
.sek-customer-template-form select,
.sek-customer-template-form textarea,
.sek-customer-template-form .sek-customer-control-row input,
.sek-customer-template-form .sek-customer-control-row textarea {
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    box-sizing: border-box;
    padding: 4px 8px;
}

.sek-customer-template-form textarea,
.sek-customer-template-form .sek-customer-control-row textarea {
    resize: none;
    overflow-y: auto;
}

.sek-customer-template-form .sek-customer-control-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.sek-customer-template-form .sek-customer-control-row {
    gap: 8px 12px;
    padding: 10px 12px;
    border-radius: 8px;
}

.sek-customer-template-form .sek-customer-control-head button {
    min-width: 30px;
    min-height: 28px;
}

.sek-customer-template-form .sek-customer-checkbox {
    gap: 7px;
}

.sek-customer-template-form .sek-customer-checkbox input {
    width: 18px;
    min-height: 18px;
}

.sek-customer-template-form > .sek-customer-secondary {
    justify-self: start;
    min-height: 32px;
    padding: 5px 10px;
}

.sek-customer-template-form .sek-access-dialog__actions {
    margin-top: 0;
    gap: 10px;
}

.sek-customer-template-form .sek-access-primary,
.sek-customer-template-form .sek-access-secondary {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 14px;
}

.sek-customer-editor.is-template-editor .sek-access-dialog__status-slot {
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .sek-customer-editor.is-template-editor .sek-customer-editor-dialog {
        width: 100%;
        height: calc(100vh - 20px);
        padding: 18px 14px;
    }

    .sek-customer-template-form {
        grid-template-rows: auto auto minmax(100px, 1fr) auto auto;
    }

    .sek-customer-template-form .sek-access-dialog__actions {
        grid-template-columns: 1fr;
    }
}


/* 0.10.4.4: compact login/project fields, project filters and editable document metadata. */
.sek-app [data-sek-access-view="login"] .sek-access-form input,
.sek-app [data-sek-access-view="subscription-new"] .sek-access-form input {
    height: 30px;
    min-height: 30px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 15px;
}

.sek-paper-setting-value {
    padding: 0 !important;
}

.sek-app .sek-paper-setting-input {
    width: 100%;
    height: 100%;
    min-height: 22px;
    margin: 0;
    padding: 4px 6px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    box-shadow: none;
}

.sek-app .sek-paper-setting-input:focus {
    outline: 1px solid #6b7280;
    outline-offset: -1px;
    background: #f8fbff;
    box-shadow: none;
}

.sek-customer-section-header--projects {
    align-items: center;
}

.sek-customer-project-filters {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sek-customer-project-filters button {
    min-height: 30px;
    padding: 4px 11px;
    border: 1px solid #cfd7e2;
    border-radius: 8px;
    background: #fff;
    color: #344155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.sek-customer-project-filters button:hover,
.sek-customer-project-filters button:focus-visible,
.sek-customer-project-filters button.is-active {
    border-color: #2b72db;
}

.sek-customer-project-filters button.is-active {
    background: #edf4ff;
    color: #195bb8;
}

@media (max-width: 720px) {
    .sek-customer-section-header--projects {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* 0.10.4.5: compact account/project dialogs and explicit signature apply flow. */
.sek-access-dialog[data-sek-access-view="login"],
.sek-access-dialog[data-sek-access-view="register"],
.sek-access-dialog[data-sek-access-view="subscription-new"] {
    width: min(520px, calc(100vw - 36px));
    padding: 22px 24px 20px;
    border-radius: 18px;
}

.sek-access-dialog[data-sek-access-view="product"] {
    width: min(700px, calc(100vw - 36px));
    padding: 22px 24px 20px;
    border-radius: 18px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-dialog__header,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-dialog__header,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-dialog__header,
.sek-access-dialog[data-sek-access-view="product"] .sek-access-dialog__header {
    gap: 16px;
    margin-bottom: 16px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-dialog__header h2,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-dialog__header h2,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-dialog__header h2,
.sek-access-dialog[data-sek-access-view="product"] .sek-access-dialog__header h2 {
    margin-bottom: 4px;
    font-size: 24px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-dialog__header p,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-dialog__header p,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-dialog__header p,
.sek-access-dialog[data-sek-access-view="product"] .sek-access-dialog__header p {
    font-size: 14px;
    line-height: 1.4;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-dialog__close,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-dialog__close,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-dialog__close,
.sek-access-dialog[data-sek-access-view="product"] .sek-access-dialog__close {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    margin-top: -7px;
    margin-right: -8px;
    font-size: 25px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-form,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-form,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-form {
    gap: 11px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-form label,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-form label,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-form label {
    gap: 4px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-form label > span,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-form label > span,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-form label > span {
    font-size: 14px;
}

.sek-app [data-sek-access-view="login"] .sek-access-form input,
.sek-app [data-sek-access-view="register"] .sek-access-form input,
.sek-app [data-sek-access-view="subscription-new"] .sek-access-form input {
    height: 30px;
    min-height: 30px;
    padding: 3px 9px;
    font-size: 14px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-dialog__actions,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-dialog__actions,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-dialog__actions {
    gap: 10px;
    margin-top: 3px;
}

.sek-access-dialog[data-sek-access-view="login"] .sek-access-primary,
.sek-access-dialog[data-sek-access-view="login"] .sek-access-secondary,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-primary,
.sek-access-dialog[data-sek-access-view="register"] .sek-access-secondary,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-primary,
.sek-access-dialog[data-sek-access-view="subscription-new"] .sek-access-secondary,
.sek-access-dialog[data-sek-access-view="product"] .sek-access-primary {
    min-height: 40px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 14px;
}

.sek-access-dialog[data-sek-access-view="product"] .sek-product-grid {
    gap: 12px;
}

.sek-access-dialog[data-sek-access-view="product"] .sek-product-card {
    min-height: 190px;
    padding: 17px;
    border-radius: 13px;
}

.sek-access-dialog[data-sek-access-view="product"] .sek-product-card h3 {
    margin: 8px 0 5px;
    font-size: 20px;
}

.sek-access-dialog[data-sek-access-view="product"] .sek-product-card p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.sek-access-dialog[data-sek-access-view="product"] .sek-product-card__eyebrow {
    font-size: 10px;
}

.sek-signature-dialog__actions .sek-classic-button,
.sek-signature-dialog__actions .sek-button {
    min-height: 38px;
    padding: 7px 12px;
}

@media (max-width: 640px) {
    .sek-access-dialog[data-sek-access-view="login"],
    .sek-access-dialog[data-sek-access-view="register"],
    .sek-access-dialog[data-sek-access-view="subscription-new"],
    .sek-access-dialog[data-sek-access-view="product"] {
        width: 100%;
        padding: 18px 16px 16px;
    }

    .sek-access-dialog[data-sek-access-view="product"] .sek-product-grid {
        grid-template-columns: 1fr;
    }

    .sek-access-dialog[data-sek-access-view="product"] .sek-product-card {
        min-height: 0;
    }
}

/* 0.10.4.6: live document refresh after spreadsheet edits and scoped document-result bulk controls. */


/* 0.10.4.7: compact document scope, neutral keyboard focus and batch document updates. */
.sek-preview-action-row--scope {
    align-items: center;
}

@media (max-width: 640px) {
    .sek-preview-action-row--scope {
        align-items: flex-start;
    }

    .sek-document-scope {
        max-width: 100%;
    }

    .sek-document-scope__option,
    .sek-document-scope p {
        white-space: normal;
    }
}


/* 0.10.4.8: separate grid/document reset actions and final action layout. */
.sek-preview-action-row--scope .sek-classic-button {
    width: 184px;
}

/* 0.10.5.1: account email verification and Cloudflare Turnstile. */
.sek-status[data-type="success"] {
    border-color: #b8d8c1;
    background: #f3fbf5;
    color: #236536;
}

.sek-access-text-button {
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: #4b5d75;
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.sek-access-text-button:hover {
    color: #1f2937;
}

.sek-access-text-button:focus-visible {
    outline: 2px solid #6b7280;
    outline-offset: 3px;
}

.sek-turnstile-slot {
    min-height: 65px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sek-access-dialog[data-sek-access-view="verify"] {
    width: min(520px, calc(100vw - 36px));
    padding: 22px 24px 20px;
    border-radius: 18px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-dialog__header {
    gap: 16px;
    margin-bottom: 16px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-dialog__header h2 {
    margin-bottom: 4px;
    font-size: 24px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-dialog__header p {
    font-size: 14px;
    line-height: 1.4;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-dialog__close {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    margin-top: -7px;
    margin-right: -8px;
    font-size: 25px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-form {
    gap: 11px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-form label {
    gap: 4px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-form label > span {
    font-size: 14px;
}

.sek-app [data-sek-access-view="verify"] .sek-access-form input {
    height: 30px;
    min-height: 30px;
    padding: 3px 9px;
    font-size: 14px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-dialog__actions {
    gap: 10px;
    margin-top: 3px;
}

.sek-access-dialog[data-sek-access-view="verify"] .sek-access-primary,
.sek-access-dialog[data-sek-access-view="verify"] .sek-access-secondary {
    min-height: 40px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 14px;
}

.sek-access-primary:disabled,
.sek-access-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 640px) {
    .sek-access-dialog[data-sek-access-view="verify"] {
        width: 100%;
        padding: 18px 16px 16px;
    }

    .sek-turnstile-slot {
        max-width: 100%;
    }
}

.sek-access-modal {
    overflow-y: auto;
}

/* 0.10.5.2: simplified customer plan state and admin customer management. */
