/* Karvi Partner — Modern Monochrome Design System */

:root {
    --karvi-black: #0a0a0a;
    --karvi-white: #ffffff;
    --karvi-muted: #71717a;
    --karvi-border: #e4e4e7;
    --karvi-surface: #fafafa;
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
    font-family: 'Material Symbols Rounded', sans-serif;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    padding: 0.55rem 1.25rem;
    background: #e23744;
    color: #fff;
}

.admin-topbar-title {
    margin: 0;
    color: #fff;
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.admin-topbar-profile {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    height: 36px;
    margin-right: 0.25rem;
    padding: 0 0.7rem 0 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.admin-topbar-profile .material-symbols-rounded {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 18px;
    line-height: 28px;
    text-align: center;
}

.admin-topbar-profile span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
}

.admin-topbar-profile strong,
.admin-topbar-profile small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-topbar-profile strong {
    max-width: 10rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.admin-topbar-profile small {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.6875rem;
}

.admin-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.admin-topbar-btn .material-symbols-rounded {
    font-size: 18px;
}

.admin-topbar-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.admin-topbar-btn.is-logout {
    background: #fff;
    border-color: #fff;
    color: #e23744;
}

.admin-topbar-btn.is-logout:hover {
    background: #fff5f5;
}

.admin-shell .sidebar-sync-progress {
    margin: 0;
    border-radius: 0;
}

@media (max-width: 720px) {
    .admin-topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 0.7rem 0.85rem;
    }
    .admin-topbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .admin-topbar-profile small {
        display: none;
    }
}

.settings-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 34px;
    margin-bottom: 0.85rem;
    padding: 0 0.75rem;
}

.settings-back .material-symbols-rounded {
    font-size: 18px;
}

a.settings-back.btn-secondary,
button.settings-back.btn-secondary {
    background: #18181b;
    border-color: #18181b;
    color: #fff;
}

a.settings-back.btn-secondary:hover,
button.settings-back.btn-secondary:hover {
    background: #09090b;
    border-color: #09090b;
    color: #fff;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: #a1a1aa;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-link:hover {
    background: #27272a;
    color: #ffffff;
}

.sidebar-link.active {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.sidebar-link .material-symbols-rounded { font-size: 1.2rem; }

.sidebar-link-label {
    flex: 1;
    min-width: 0;
}

.sidebar-link-disabled {
    opacity: 0.55;
    cursor: pointer;
}

.sidebar-link-disabled:hover {
    background: transparent;
    color: #a1a1aa;
}

.sidebar-link-disabled.active {
    background: #27272a;
    color: #d4d4d8;
    box-shadow: none;
}

.sidebar-link-soon {
    margin-left: auto;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #27272a;
    color: #a1a1aa;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.sidebar-link-disabled.active .sidebar-link-soon {
    background: #3f3f46;
    color: #e4e4e7;
}

.lieferando-product-nav {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.lieferando-product-nav .lieferando-product-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.875rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: #a1a1aa;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.lieferando-product-nav .lieferando-product-link:hover {
    background: #27272a;
    color: #ffffff;
    border-color: #3f3f46;
}

.lieferando-product-nav .lieferando-product-link.active {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.lieferando-product-nav .lieferando-product-link.active .lieferando-product-icon {
    background: #0a0a0a;
    color: #ffffff;
}

.lieferando-product-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
    background: #27272a;
    color: #e4e4e7;
    flex-shrink: 0;
}

.lieferando-product-icon .material-symbols-rounded {
    font-size: 1.125rem;
}

.lieferando-product-nav .lieferando-product-link .sidebar-link-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lieferando-nav-count {
    flex-shrink: 0;
    min-width: 1.625rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: #27272a;
    color: #d4d4d8;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.lieferando-product-link.active .lieferando-nav-count {
    background: #f4f4f5;
    color: #18181b;
}

.lieferando-sidebar-brand {
    display: block;
}

.lieferando-sidebar-logo {
    display: block;
    width: 100%;
    max-height: 3.5rem;
    object-fit: contain;
    object-position: left center;
}

body.lieferando-auth-page {
    background: #000;
    color: #fafafa;
}

.lieferando-auth-shell {
    background: #000;
}

.lieferando-auth-footer {
    color: #52525b;
}

.lieferando-login-card {
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    border: 1px solid #27272a;
    border-radius: 1.25rem;
    background: #111111;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.lieferando-login-brand {
    margin-bottom: 1.75rem;
    text-align: center;
}

.lieferando-login-logo {
    display: block;
    width: 100%;
    max-height: 3.5rem;
    margin: 0 auto;
    object-fit: contain;
}

.lieferando-login-copy {
    margin-bottom: 1.5rem;
    text-align: center;
}

.lieferando-login-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fafafa;
}

.lieferando-login-subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #a1a1aa;
}

.lieferando-login-alert {
    margin-bottom: 1.25rem;
    background: #18181b;
    border-color: #52525b;
    color: #fafafa;
}

.lieferando-login-form .form-label {
    color: #e4e4e7;
}

.lieferando-login-form .form-input {
    background: #09090b;
    border-color: #3f3f46;
    color: #fafafa;
}

.lieferando-login-form .form-input::placeholder {
    color: #71717a;
}

.lieferando-login-form .form-input:hover {
    border-color: #52525b;
}

.lieferando-login-form .form-input:focus {
    border-color: #fafafa;
    box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.08);
}

.lieferando-login-form .input-icon {
    color: #71717a;
}

.lieferando-login-form .btn-primary {
    background: #ffffff;
    color: #09090b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(255, 255, 255, 0.08);
}

.lieferando-login-form .btn-primary:hover {
    background: #f4f4f5;
    color: #09090b;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}

.lieferando-login-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #71717a;
}

.lieferando-sidebar-label {
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #71717a;
}

.lieferando-sidebar-empty,
.lieferando-sidebar-loading {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: #18181b;
    border: 1px dashed #3f3f46;
    color: #a1a1aa;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.lieferando-sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem 1rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #3f3f46 transparent;
}

.lieferando-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.lieferando-sidebar-nav::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 9999px;
}

.service-status-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.service-status-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.service-status-toggle-track {
    position: relative;
    display: block;
    width: 2.75rem;
    height: 1.5rem;
    background: #d4d4d8;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.service-status-toggle-thumb {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    background: #fff;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.service-status-toggle-input:checked + .service-status-toggle-track {
    background: #16a34a;
}

.service-status-toggle-input:checked + .service-status-toggle-track .service-status-toggle-thumb {
    transform: translateX(1.25rem);
}

.service-status-toggle-input:disabled + .service-status-toggle-track {
    opacity: 0.55;
    cursor: not-allowed;
}

.service-status-toggle-input:focus-visible + .service-status-toggle-track {
    outline: 2px solid var(--karvi-black);
    outline-offset: 2px;
}

.lieferando-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lieferando-api-error {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--karvi-200);
    background: var(--karvi-white);
    color: var(--karvi-500);
}

.lieferando-api-error .material-symbols-rounded {
    flex-shrink: 0;
    color: var(--karvi-500);
}

.lieferando-api-error-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--karvi-950);
}

.lieferando-api-error-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--karvi-500);
}

.lieferando-dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.125rem !important;
}

.lieferando-dashboard-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--karvi-950);
}

.lieferando-dashboard-subtitle {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--karvi-500);
}

.lieferando-dashboard-toolbar {
    padding-top: 0.125rem;
}

.lieferando-dashboard-stats {
    margin-bottom: 0;
}

.lieferando-dashboard-panel {
    padding: 0 !important;
    overflow: hidden;
}

.lieferando-dashboard-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--karvi-border);
    background: #fafafa;
}

.lieferando-dashboard-panel-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--karvi-950);
}

.lieferando-dashboard-panel-count {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: var(--karvi-500);
}

.lieferando-table-scroll {
    overflow-x: auto;
}

.lieferando-services-table-wrap {
    border: none;
    border-radius: 0;
}

.lieferando-services-table thead th {
    white-space: nowrap;
}

.lieferando-services-table thead th.lieferando-col-restaurant {
    min-width: 14rem;
    width: 32%;
}

.lieferando-services-table thead th.lieferando-col-date {
    width: 8.5rem;
}

.lieferando-services-table thead th.lieferando-col-status {
    width: 6.5rem;
    text-align: center;
}

.lieferando-services-table thead th.lieferando-col-docs {
    width: auto;
    min-width: 18rem;
    white-space: nowrap;
}

.lieferando-services-table tbody td.lieferando-col-docs {
    vertical-align: middle;
    width: auto;
    white-space: nowrap;
}

.lieferando-services-table tbody td.lieferando-col-date {
    font-size: 0.8125rem;
    color: #52525b;
    white-space: nowrap;
    vertical-align: middle;
}

.lieferando-services-table tbody td.lieferando-col-status {
    text-align: center;
    vertical-align: middle;
}

.lieferando-restaurant-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.lieferando-restaurant-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: #f4f4f5;
    color: #52525b;
    flex-shrink: 0;
}

.lieferando-restaurant-icon .material-symbols-rounded {
    font-size: 1.125rem;
}

.lieferando-restaurant-copy {
    min-width: 0;
}

.lieferando-restaurant-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--karvi-950);
    line-height: 1.35;
}

.lieferando-restaurant-address {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: var(--karvi-500);
    line-height: 1.45;
}

.lieferando-status-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.lieferando-status-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #71717a;
}

.lieferando-status-label.is-on {
    color: #15803d;
}

.lieferando-doc-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.375rem;
    width: max-content;
    max-width: none;
}

.lieferando-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    width: auto;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    background: #fff;
    color: #18181b;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.lieferando-doc-btn:hover:not(:disabled) {
    border-color: #18181b;
    background: #fafafa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lieferando-doc-btn:active:not(:disabled) {
    background: #f4f4f5;
}

.lieferando-doc-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 0.375rem;
    background: #18181b;
    color: #fff;
    flex-shrink: 0;
}

.lieferando-doc-btn-icon .material-symbols-rounded {
    font-size: 0.8125rem;
}

.lieferando-doc-btn-label {
    flex: none;
    white-space: nowrap;
}

.lieferando-doc-btn-disabled,
.lieferando-doc-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lieferando-doc-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.lieferando-doc-btn.is-loading .lieferando-doc-btn-icon {
    animation: spin 0.8s linear infinite;
}

.lieferando-doc-btn-group {
    display: inline-flex;
    align-items: stretch;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.lieferando-doc-btn-view {
    width: 2rem;
    min-width: 2rem;
    padding: 0.375rem;
    justify-content: center;
}

.lieferando-doc-btn-view .lieferando-doc-btn-icon {
    background: #fff;
    color: #18181b;
    border: 1px solid #e4e4e7;
}

.lieferando-services-table thead th.lieferando-col-comment {
    width: 9.5rem;
    min-width: 9.5rem;
}

.lieferando-services-table tbody td.lieferando-col-comment {
    vertical-align: middle;
    white-space: nowrap;
}

.lieferando-comment-cell {
    display: flex;
    align-items: center;
}

.lieferando-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid #d4d4d8;
    background: #fff;
    color: #18181b;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lieferando-comment-btn:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
}

.lieferando-comment-btn .material-symbols-rounded {
    font-size: 1rem;
    color: #18181b;
}

.lieferando-comment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #18181b;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
}

.lieferando-chat-modal .admin-modal-backdrop {
    background: rgba(24, 24, 27, 0.55);
}

.lieferando-chat-dialog {
    width: min(100%, 28rem);
    max-width: 28rem;
    height: min(88vh, 44rem);
    max-height: 44rem;
    margin: auto;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 1.25rem;
    border: 1px solid #e4e4e7;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.lieferando-chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    background: #18181b;
    color: #fff;
    flex: 0 0 auto;
    border-bottom: 1px solid #27272a;
    border-radius: 1.25rem 1.25rem 0 0;
}

.lieferando-chat-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.lieferando-chat-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lieferando-chat-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1rem;
    background: #fff;
    color: #18181b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lieferando-chat-avatar .material-symbols-rounded {
    font-size: 1.35rem;
}

.lieferando-chat-header-copy {
    min-width: 0;
    flex: 1;
}

.lieferando-chat-title {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lieferando-chat-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #a1a1aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lieferando-chat-content {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    overflow: hidden;
}

.lieferando-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.lieferando-chat-date-divider {
    align-self: center;
    margin: 0.15rem 0 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e4e4e7;
    color: #71717a;
    font-size: 0.6875rem;
    font-weight: 600;
}

.lieferando-chat-message {
    display: flex;
    flex-direction: column;
    max-width: 88%;
}

.lieferando-chat-message.is-outgoing {
    align-self: flex-end;
    align-items: flex-end;
}

.lieferando-chat-message.is-incoming {
    align-self: flex-start;
    align-items: flex-start;
}

.lieferando-chat-author {
    margin: 0 0 0.25rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #52525b;
}

.lieferando-chat-bubble {
    position: relative;
    padding: 0.7rem 0.85rem 0.5rem;
    border-radius: 1rem;
    word-break: break-word;
}

.lieferando-chat-message.is-incoming .lieferando-chat-bubble {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-top-left-radius: 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lieferando-chat-message.is-outgoing .lieferando-chat-bubble {
    background: #18181b;
    color: #fff;
    border-top-right-radius: 0.35rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.lieferando-chat-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.lieferando-chat-message.is-outgoing .lieferando-chat-text {
    color: #fff;
}

.lieferando-chat-message.is-incoming .lieferando-chat-text {
    color: #18181b;
}

.lieferando-chat-meta {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.35rem;
    font-size: 0.625rem;
}

.lieferando-chat-message.is-incoming .lieferando-chat-meta {
    color: #a1a1aa;
}

.lieferando-chat-message.is-outgoing .lieferando-chat-meta {
    color: rgba(255, 255, 255, 0.72);
}

.lieferando-chat-empty,
.lieferando-chat-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1.5rem;
    text-align: center;
    color: #71717a;
    font-size: 0.875rem;
}

.lieferando-chat-empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e4e4e7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #18181b;
}

.lieferando-chat-loading .material-symbols-rounded {
    animation: spin 0.8s linear infinite;
}

.lieferando-chat-footer {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #e4e4e7;
    border-radius: 0 0 1.25rem 1.25rem;
}

.lieferando-chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    margin: 0;
}

.lieferando-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.5rem;
    max-height: 7.5rem;
    height: 2.5rem;
    border: 1px solid #e4e4e7;
    border-radius: 1rem;
    background: #fafafa;
    padding: 0.625rem 0.95rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #18181b;
    resize: none;
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    appearance: none;
    -webkit-appearance: none;
}

.lieferando-chat-input::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.lieferando-chat-input::-webkit-resizer {
    display: none;
}

.lieferando-chat-input.is-at-max-height {
    overflow-y: auto;
}

.lieferando-chat-input:focus {
    outline: none;
    border-color: #18181b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.lieferando-chat-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0;
    border: 0;
    border-radius: 9999px;
    background: #18181b;
    color: #fff;
    cursor: pointer;
    flex: 0 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.lieferando-chat-send:hover {
    background: #27272a;
}

.lieferando-chat-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.lieferando-chat-send .material-symbols-rounded {
    font-size: 1.15rem;
}

.lieferando-empty-state {
    padding: 2rem 1.25rem;
}

@media (max-width: 640px) {
    .lieferando-dashboard-header {
        padding: 0.875rem !important;
    }

    .lieferando-dashboard-title {
        font-size: 1.125rem;
    }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#sidebar.open { transform: translateX(0); }
#sidebar-backdrop.open { display: block; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--karvi-black);
    color: var(--karvi-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.08);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    background: #27272a;
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--karvi-white);
    color: var(--karvi-black);
    border: 1.5px solid var(--karvi-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--karvi-black);
    background: var(--karvi-surface);
}

.btn-actions-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 7rem;
    padding: 0.55rem 1rem !important;
    background: var(--karvi-black) !important;
    color: #fff !important;
    border: 2px solid var(--karvi-black) !important;
    border-radius: var(--radius-md);
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.data-table .btn-actions-trigger,
.data-table .btn-actions-trigger:hover,
.data-table .btn-actions-trigger:focus {
    background: var(--karvi-black) !important;
    color: #fff !important;
    border-color: var(--karvi-black) !important;
}

.btn-actions-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
    background: #27272a !important;
    border-color: #27272a !important;
}

.btn-actions-trigger .material-symbols-rounded {
    font-size: 1.15rem;
    color: #fff !important;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    color: var(--karvi-muted);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: #f4f4f5;
    color: var(--karvi-black);
}

.btn-ghost-danger {
    color: #b91c1c;
}

.btn-ghost-danger:hover {
    background: #fef2f2;
    color: #991b1b;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #b91c1c;
    background: #dc2626;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-modal.hidden {
    display: none;
}

body.admin-modal-open {
    overflow: hidden;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.admin-modal-dialog {
    position: relative;
    width: min(100%, 28rem);
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid var(--karvi-border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    padding: 1.25rem;
}

.admin-modal-dialog-compact {
    width: min(100%, 22rem);
}

.admin-modal-password {
    z-index: 90;
}

/* Confirmation / delete overlays must sit above Actions (z-index 80). */
#deleteContractModal.admin-modal,
#serviceDeleteModal.admin-modal,
.admin-modal-elevated {
    z-index: 100;
}

#deleteContractModal .admin-modal-backdrop,
#serviceDeleteModal .admin-modal-backdrop,
.admin-modal-elevated .admin-modal-backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.admin-modal-password .admin-modal-backdrop {
    background: rgba(15, 23, 42, 0.2);
}

.admin-modal-password.admin-modal-password-standalone .admin-modal-backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.admin-modal-dialog-password {
    width: min(100%, 19rem);
    padding: 1rem 1.15rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
}

.admin-modal-dialog-upload {
    width: min(calc(100vw - 2rem), 34rem);
    max-width: 34rem;
    padding: 1.75rem 2rem 1.5rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.admin-modal-dialog-upload .admin-modal-head {
    margin-bottom: 0.25rem;
    text-align: center;
}

.admin-modal-dialog-upload .admin-modal-head h3 {
    font-size: 1.25rem;
}

.admin-modal-body-upload {
    margin-top: 1.25rem;
}

.admin-modal-upload-field {
    margin-top: 0.5rem;
}

.admin-modal-upload-existing {
    margin-bottom: 1.25rem;
}

.admin-modal-upload-existing-head .form-label {
    margin-bottom: 0.65rem;
}

.admin-modal-upload-existing-empty {
    margin: 0;
    padding: 0.85rem 0.9rem;
    border: 1px dashed #e4e4e7;
    border-radius: var(--radius-md);
    background: #fafafa;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #71717a;
    text-align: center;
}

.admin-modal-upload-existing-empty.hidden {
    display: none;
}

.admin-modal-existing-file-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-modal-existing-file-list.hidden {
    display: none;
}

.admin-modal-existing-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #e4e4e7;
    border-radius: var(--radius-md);
    background: #fff;
}

.admin-modal-existing-file-meta {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.admin-modal-existing-file-icon {
    flex: 0 0 auto;
    font-size: 1.5rem;
    color: #b91c1c;
    margin-top: 0.1rem;
}

.admin-modal-existing-file-text {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-modal-existing-file-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: #18181b;
    word-break: break-word;
}

.admin-modal-existing-file-date {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #71717a;
}

.admin-modal-existing-file-badge {
    display: inline-flex;
    margin-top: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.admin-modal-existing-file-remove {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.admin-modal-existing-file-remove:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.admin-modal-existing-file-remove:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-modal-upload-field.hidden {
    display: none;
}

.admin-modal-upload-field .form-label {
    margin-bottom: 0.65rem;
}

.admin-modal-upload-zone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8.5rem;
    padding: 1.5rem 1.25rem;
    border: 1.5px dashed #d4d4d8;
    border-radius: var(--radius-md);
    background: #fafafa;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.admin-modal-upload-zone:hover,
.admin-modal-upload-zone:focus-within {
    border-color: #a1a1aa;
    background: #f4f4f5;
}

.admin-modal-upload-zone .admin-modal-upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
}

.admin-modal-upload-zone-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.25rem;
    text-align: center;
    pointer-events: none;
}

.admin-modal-upload-zone-icon {
    font-size: 2rem;
    color: #71717a;
}

.admin-modal-upload-zone-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #18181b;
}

.admin-modal-upload-zone-sub {
    max-width: 18rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #71717a;
}

.admin-modal-file-list {
    margin: 0.85rem 0 0;
    padding: 0.75rem 0.9rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid #f4f4f5;
    border-radius: var(--radius-md);
    background: #fff;
}

.admin-modal-file-list.hidden {
    display: none;
}

.admin-modal-file-list li {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #3f3f46;
    word-break: break-word;
}

.admin-modal-upload-error {
    margin: 1rem 0 0;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: center;
}

.admin-modal-upload-error.hidden {
    display: none;
}

.admin-modal-actions-centered {
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--karvi-border);
}

.admin-modal-head-compact {
    margin-bottom: 0;
}

.admin-modal-dialog-password .admin-modal-body {
    margin-top: 0.75rem;
}

.admin-modal-actions-compact {
    margin-top: 1rem;
}

.admin-modal-body {
    margin-top: 1rem;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.admin-modal-dialog-actions {
    width: min(100%, 24rem);
    padding: 1.35rem 1.35rem 1.15rem;
}

.admin-modal-head-actions {
    margin-bottom: 0.15rem;
}

.admin-modal-actions-actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--karvi-border);
}

.admin-modal-actions-actions .btn-secondary-full {
    flex: 1;
}

.btn-secondary-full {
    width: 100%;
    justify-content: center;
}

.contract-actions-popup {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.contract-actions-divider {
    height: 1px;
    margin: 0.15rem 0;
    background: var(--karvi-border);
}

.contract-actions-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-lg);
    background: var(--karvi-white);
    color: var(--karvi-900);
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.contract-actions-item:hover {
    background: var(--karvi-50, #f8fafc);
    border-color: var(--karvi-300, #cbd5e1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.contract-actions-item-toggle {
    cursor: default;
}

.contract-actions-item-toggle:hover {
    background: var(--karvi-white);
    border-color: var(--karvi-border);
    box-shadow: none;
}

.contract-actions-item-toggle:active {
    transform: none;
}

.contract-actions-item-toggle .service-status-toggle {
    flex-shrink: 0;
    margin-left: auto;
}

.contract-actions-item-toggle.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.contract-actions-item-toggle.is-loading .service-status-toggle-track {
    opacity: 0.65;
}

.contract-actions-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background: var(--karvi-100);
    color: var(--karvi-800);
}

.contract-actions-item-label {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.contract-actions-item .material-symbols-rounded {
    font-size: 1.05rem;
}

.contract-actions-item-danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fffafa;
}

.contract-actions-item-danger .contract-actions-item-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.contract-actions-item-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.contract-actions-form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

.idb-json-view {
    max-height: 24rem;
    overflow: auto;
    margin: 0;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--karvi-100);
    border: 1px solid var(--karvi-border);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.card {
    background: var(--karvi-white);
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,.02), 0 4px 24px -4px rgba(0,0,0,.06);
}

.card-elevated {
    background: var(--karvi-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 20px 60px -15px rgba(0,0,0,.12);
}

.card-header {
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--karvi-border);
}

.stat-card {
    background: var(--karvi-white);
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #d4d4d8;
    box-shadow: 0 8px 30px -8px rgba(0,0,0,.1);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #3f3f46;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--karvi-white);
    border: 1.5px solid var(--karvi-border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--karvi-black);
    transition: all 0.2s ease;
}

.form-input::placeholder { color: #a1a1aa; }
.form-input:hover { border-color: #d4d4d8; }

.form-input:focus {
    outline: none;
    border-color: var(--karvi-black);
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.form-input-icon-wrap { position: relative; }
.form-input-icon-wrap .form-input { padding-left: 2.75rem; }

.form-input-icon-wrap .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    pointer-events: none;
}

.form-input-password-wrap .form-input {
    padding-right: 2.75rem;
}

.form-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #71717a;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.form-password-toggle:hover {
    color: var(--karvi-black);
    background: rgba(0, 0, 0, 0.04);
}

.form-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

textarea.form-input { resize: vertical; min-height: 80px; }

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-pending {
    background: #f4f4f5;
    color: #52525b;
    border: 1px solid #e4e4e7;
}

.status-signed,
.status-paid {
    background: var(--karvi-black);
    color: var(--karvi-white);
}

.status-cancelled {
    background: #f4f4f5;
    color: #52525b;
    border: 1px solid #e4e4e7;
}

.status-badge-neutral {
    background: #f4f4f5;
    color: #52525b;
    border: 1px solid #e4e4e7;
}

.data-table-wrap {
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--karvi-border);
    background: var(--karvi-white);
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table thead th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #71717a;
    background: #fafafa;
    border-bottom: 1px solid var(--karvi-border);
}

.data-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f4f4f5;
    vertical-align: middle;
}

.service-customer-cell {
    min-width: 12rem;
    max-width: 22rem;
}

.service-customer-name {
    font-weight: 600;
    color: var(--karvi-black);
    line-height: 1.35;
}

.service-customer-address {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--karvi-muted);
}

.service-order-by-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.service-order-by-value {
    min-width: 1.25rem;
    font-weight: 600;
    color: var(--karvi-black);
}

.service-order-by-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--karvi-border);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--karvi-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.service-order-by-edit .material-symbols-rounded {
    font-size: 1rem;
}

.service-order-by-edit:hover,
.service-order-by-edit:focus-visible {
    color: var(--karvi-black);
    border-color: #d4d4d8;
    background: #fafafa;
    outline: none;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: #fafafa; }

.contract-card-mobile {
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    background: var(--karvi-white);
}

.signature-canvas {
    width: 100%;
    max-width: 100%;
    height: 200px;
    border: 2px dashed #d4d4d8;
    border-radius: var(--radius-lg);
    background: #fafafa;
    cursor: crosshair;
    touch-action: none;
    transition: border-color 0.2s;
}

.signature-canvas:hover { border-color: var(--karvi-black); }

.tab-group {
    display: inline-flex;
    padding: 4px;
    background: #f4f4f5;
    border-radius: var(--radius-md);
    gap: 2px;
}

.tab-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    background: transparent;
    color: #71717a;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--karvi-white);
    color: var(--karvi-black);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.tab-btn:not(.active):hover { color: var(--karvi-black); }

.pdf-viewer {
    width: 100%;
    height: min(70vh, 640px);
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-lg);
    background: #f4f4f5;
}

.steps-bar {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
}

.step-item:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e4e4e7;
    margin: 0 0.75rem;
}

.step-item.done:not(:last-child)::after { background: var(--karvi-black); }

.step-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid #e4e4e7;
    color: #a1a1aa;
    background: var(--karvi-white);
    shrink: 0;
}

.step-item.active .step-dot,
.step-item.done .step-dot {
    background: var(--karvi-black);
    border-color: var(--karvi-black);
    color: var(--karvi-white);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a1a1aa;
    white-space: nowrap;
}

.step-item.active .step-label,
.step-item.done .step-label { color: var(--karvi-black); }

.copy-link-box {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.copy-link-box input {
    flex: 1;
    font-size: 0.8125rem;
    font-family: ui-monospace, monospace;
}

.empty-state { text-align: center; padding: 4rem 2rem; }

.empty-state-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-xl);
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon .material-symbols-rounded {
    font-size: 2.5rem;
    color: #a1a1aa;
}

.success-ring {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--karvi-black);
    color: var(--karvi-white);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scale-in 0.5s cubic-bezier(.4,0,.2,1);
}

.success-ring .material-symbols-rounded { font-size: 2.5rem; }

.info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fafafa;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: #52525b;
    line-height: 1.5;
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 1.5px solid var(--karvi-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-card:hover { border-color: #d4d4d8; background: #fafafa; }

.checkbox-card:has(input:checked) {
    border-color: var(--karvi-black);
    background: #fafafa;
}

.checkbox-card input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 2px;
    accent-color: var(--karvi-black);
    shrink: 0;
}

.upload-zone {
    border: 2px dashed #d4d4d8;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--karvi-black);
    background: #fafafa;
}

.upload-zone input[type="file"] { display: none; }

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fade-in 0.4s ease forwards; }

.form-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--karvi-black);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--karvi-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fafafa;
    border: 1.5px solid var(--karvi-black);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.link-success-box {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.link-success-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--karvi-black);
}

@media (max-width: 768px) {
    .data-table-wrap:not(.customer-documents-table-wrap):not(.lieferando-services-table-wrap) { display: none; }
    .mobile-cards { display: block; }
}

@media (min-width: 769px) {
    .mobile-cards { display: none; }
}

@media (max-width: 640px) {
    .step-label { display: none; }
    .pdf-viewer { height: 50vh; min-height: 280px; }
}

/* ── Language Switcher (floating, no header) ── */
.lang-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--karvi-border);
    border-radius: 9999px;
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.lang-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 9999px;
    background: transparent;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--karvi-muted);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-switcher.is-switching {
    opacity: 0.85;
    pointer-events: none;
}

.lang-option:hover {
    color: var(--karvi-black);
    background: #f4f4f5;
}

.lang-option.active {
    background: var(--karvi-black);
    color: var(--karvi-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lang-divider {
    width: 1px;
    height: 1rem;
    background: var(--karvi-border);
    margin: 0 2px;
}

/* ── Mobile sidebar FAB ── */
.mobile-nav-fab {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 45;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: var(--karvi-black);
    color: var(--karvi-white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s;
}

.mobile-nav-fab:active {
    transform: scale(0.95);
}

/* ── Compact contract form ── */
.compact-form .cf-row {
    display: grid;
    gap: 0.75rem;
}

.cf-row-1 { grid-template-columns: 1fr; }
.cf-row-2 { grid-template-columns: 1fr; }
.cf-row-3 { grid-template-columns: 1fr; }

@media (min-width: 1024px) {
    .cf-row-2 { grid-template-columns: 1fr 1fr; }
    .cf-row-3 { grid-template-columns: repeat(3, 1fr); }
}

.cf-card {
    background: #fafafa;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    height: 100%;
}

.cf-card-commission {
    background: #fff;
}

.cf-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--karvi-border);
}

.cf-card-icon {
    font-size: 1.125rem;
    color: var(--karvi-black);
}

.cf-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--karvi-black);
    line-height: 1.2;
}

.cf-card-note {
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--karvi-black);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.cf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
}

.cf-grid-stacked {
    grid-template-columns: 1fr;
}

.cf-grid-thirds {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .cf-grid-thirds {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cf-card-full {
    width: 100%;
}

.cf-grid-commission {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .cf-grid:not(.cf-grid-stacked):not(.cf-grid-commission) {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cf-field { min-width: 0; }
.cf-span-full { grid-column: 1 / -1; }
.cf-span-3 { grid-column: span 2; }
.cf-span-2 { grid-column: span 2; }
.cf-span-1 { grid-column: span 1; }

@media (min-width: 640px) {
    .cf-span-3 { grid-column: span 3; }
}

.compact-form .cf-hint {
    font-size: 0.8125rem;
    color: #71717a;
    margin-top: 0.375rem;
    line-height: 1.4;
}

.brand-radio-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.brand-radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1.5px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.brand-radio-option:has(input:checked) {
    border-color: var(--karvi-black);
    background: var(--karvi-black);
    color: #fff;
}

.brand-radio-option input[type="radio"],
.brand-radio-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.brand-radio-option:hover {
    border-color: var(--karvi-black);
}

.cf-brand-owners-row {
    margin-bottom: 0;
}

.cf-brand-owners-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem 1rem;
    align-items: end;
}

@media (min-width: 640px) {
    .cf-brand-owners-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}

.cf-brand-owners-brand .brand-radio-group {
    margin-top: 0.25rem;
}

.cf-brand-owners-count .form-input {
    width: 100%;
}

.compact-form .cf-card-commission .cf-grid-commission {
    grid-template-columns: repeat(2, 1fr);
}

/* legacy section styles kept for other pages */
.form-section-block {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--karvi-border);
}

.commission-block {
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--karvi-border);
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.commission-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--karvi-black);
    color: var(--karvi-white);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Registration wizard */
html:has(body.reg-page),
body.reg-page {
    overflow-x: hidden;
    min-height: 100dvh;
    height: auto;
}

body.reg-page {
    display: flex;
    flex-direction: column;
}

body.reg-page main {
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    width: 100%;
    padding: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.reg-page > footer {
    flex-shrink: 0;
    margin-top: 0;
    position: relative;
    z-index: 10;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

body.hide-global-lang > .lang-switcher {
    display: none;
}

.reg-shell {
    flex: 1;
    min-height: 0;
    height: auto;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 0.5rem 1rem calc(4.75rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reg-shell-done,
.reg-shell-complete {
    justify-content: center;
    padding-bottom: 1rem;
}

.reg-shell-complete .reg-footer {
    display: none;
}

.reg-header {
    flex-shrink: 0;
    padding-bottom: 0.875rem;
    margin-bottom: 0.25rem;
}

.reg-header-brand {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 0.625rem;
}

.reg-header-logo {
    display: block;
    height: 3.25rem;
    width: auto;
    max-width: min(220px, 62vw);
    object-fit: contain;
}

.reg-header-title,
.reg-header h1 {
    font-size: clamp(1.5rem, 4.5vw, 1.875rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.reg-header > p {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.reg-steps-simple {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
    margin: 0.875rem 0 0;
    padding: 0;
}

.reg-steps-simple li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.875rem;
    background: #fafafa;
    text-align: center;
    color: #71717a;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.reg-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: #e4e4e7;
    color: #52525b;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.reg-step-label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
}

.reg-steps-simple li.active {
    color: var(--karvi-black);
    background: #fff;
    border-color: var(--karvi-black);
    box-shadow: 0 2px 8px rgba(24, 24, 27, 0.08);
}

.reg-steps-simple li.active .reg-step-badge {
    background: var(--karvi-black);
    color: #fff;
}

.reg-steps-simple li.done {
    color: #52525b;
    background: #f4f4f5;
    border-color: #d4d4d8;
}

.reg-steps-simple li.done .reg-step-badge {
    background: #71717a;
    color: #fff;
}

.reg-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 0.375rem;
}

.reg-panel-step1 .reg-panel-head-compact {
    padding-top: 0;
    margin-top: 0;
}

.reg-panel-step1 .reg-panel-head-compact h2 {
    margin-top: 0;
}

.reg-panel {
    animation: fade-in 0.25s ease;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reg-panel.hidden {
    display: none;
}

.reg-panel-head-compact {
    flex-shrink: 0;
}

.reg-panel-head-compact h2 {
    font-size: 1.125rem;
}

.reg-panel-head-compact p {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
}

.reg-panel-head h2 {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--karvi-black);
}

.reg-panel-head p {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: #71717a;
}

.reg-step-2-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #52525b;
    text-align: left;
}

.reg-summary-card .contract-doc-page-one {
    padding: 0.75rem 0.875rem 1rem;
}

.reg-summary-card .contract-doc-page-one .contract-doc-hero {
    padding-top: 0;
}

.reg-summary-card .contract-doc-block {
    margin-bottom: 1rem;
}

.contract-doc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.contract-doc-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    table-layout: fixed;
}

.contract-doc-table-compact {
    min-width: 0;
    font-size: 0.625rem;
    table-layout: auto;
}

.contract-doc-table-compact th,
.contract-doc-table-compact td {
    padding: 0.3rem 0.25rem;
}

.contract-doc-table-compact thead th {
    font-size: 0.5625rem;
    letter-spacing: 0.02em;
}

.contract-doc-table-compact col.contract-doc-col-index,
.contract-doc-table-compact .contract-doc-col-index {
    width: 1.6rem;
}

.contract-doc-table-compact col.contract-doc-col-money {
    width: 5.25rem;
}

.contract-doc-table th,
.contract-doc-table td {
    vertical-align: top;
    padding: 0.4rem 0.375rem;
    line-height: 1.25;
    border-bottom: 1px solid var(--karvi-border);
    text-align: left;
}

.contract-doc-table thead th {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #71717a;
    border-bottom-color: #d4d4d8;
    padding-top: 0.375rem;
    padding-bottom: 0.5rem;
}

.contract-doc-table tbody tr:last-child td {
    border-bottom-color: #e4e4e7;
}

.contract-doc-table col.contract-doc-col-index {
    width: 2.5rem;
}

.contract-doc-table col.contract-doc-col-qty {
    width: 3.25rem;
}

.contract-doc-table col.contract-doc-col-money {
    width: 6.75rem;
}

.contract-doc-table .contract-doc-col-index {
    width: 2.5rem;
    color: #71717a;
    font-variant-numeric: tabular-nums;
}

.contract-doc-table .contract-doc-col-desc {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.contract-doc-table .contract-doc-col-qty,
.contract-doc-table .contract-doc-col-money {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.contract-doc-table .contract-doc-money {
    display: inline-block;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.contract-doc-table .contract-doc-money-empty {
    color: #a1a1aa;
}

.contract-doc-terms-heading-main {
    font-family: var(--font-display, inherit);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--karvi-950);
    margin: 0 0 0.4rem;
    text-align: left;
    line-height: 1.25;
}

.contract-doc-terms-heading {
    font-size: 0.625rem;
    font-weight: 400;
    color: var(--karvi-950);
    margin: 0.55rem 0 0.28rem;
    text-align: left;
    line-height: 1.25;
}

.contract-doc-terms-paragraph {
    margin: 0 0 0.28rem;
    font-size: 0.625rem;
    font-weight: 400;
    line-height: 1.32;
    color: #3f3f46;
    text-align: left;
}

.contract-doc-terms-spacer {
    height: 0.5rem;
}

.contract-doc-terms-table-wrap {
    margin: 0.65rem 0 0.85rem;
}

.contract-doc-terms-table-caption {
    margin: 0 0 0.3rem;
    font-size: 0.625rem;
    font-weight: 400;
    color: var(--karvi-950);
}

.contract-doc-terms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.5625rem;
    font-weight: 400;
    line-height: 1.25;
}

.contract-doc-terms-table th,
.contract-doc-terms-table td {
    border: 1px solid #d4d4d8;
    padding: 0.28rem 0.5rem;
    text-align: left;
    vertical-align: top;
    font-weight: 400;
}

.contract-doc-terms-table thead th {
    background: #f4f4f5;
    font-weight: 400;
    color: var(--karvi-950);
}

.contract-doc-terms-table tbody th {
    width: 38%;
    font-weight: 400;
    color: #3f3f46;
    background: #fafafa;
}

.contract-doc-terms-table tbody td {
    color: #27272a;
}

.contract-doc-checkbox {
    display: inline-block;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--karvi-950);
}

.contract-doc-checkbox-empty {
    color: #71717a;
}

.contract-doc-terms-label {
    font-weight: 400;
    color: var(--karvi-950);
}

.reg-step2-installments {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #ececee;
    border-radius: 0.75rem;
    background: #fafafa;
}

.reg-step2-installments .contract-doc-installments-compact {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.reg-step2-installments .contract-doc-installments-compact-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.08rem;
}

.contract-doc-installments-compact {
    margin: 0 0 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #ececee;
}

.contract-doc-installments-compact-title {
    margin: 0 0 0.3rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: #18181b;
}

.contract-doc-installments-compact-head,
.contract-doc-installments-compact-grid li {
    display: grid;
    grid-template-columns: 0.9rem minmax(0, 1fr) 4.25rem 4.25rem;
    align-items: baseline;
    column-gap: 0.35rem;
    font-size: 0.6875rem;
    line-height: 1.55;
    color: #3f3f46;
}

.contract-doc-installments-compact-head {
    margin-bottom: 0.15rem;
    padding-bottom: 0.12rem;
    border-bottom: 1px solid #ececee;
    color: #71717a;
    font-size: 0.625rem;
}

.contract-doc-installments-compact-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.08rem;
}

.contract-doc-installments-compact-num {
    color: #a1a1aa;
    font-variant-numeric: tabular-nums;
}

.contract-doc-installments-compact-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contract-doc-installments-compact-money {
    text-align: right;
    color: #18181b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.contract-doc-installments-compact-head .contract-doc-installments-compact-money {
    color: #71717a;
}

@media (max-width: 420px) {
    .contract-doc-installments-compact-head,
    .contract-doc-installments-compact-grid li {
        grid-template-columns: 0.85rem minmax(0, 1fr) 3.6rem 3.6rem;
        column-gap: 0.25rem;
    }
}

.contract-doc-terms,
.contract-doc-terms * {
    font-weight: 400 !important;
}

.contract-doc-terms-website .contract-doc-terms-heading-main,
.contract-doc-terms-transfer .contract-doc-terms-heading-main {
    font-size: 0.6875rem;
}

.contract-doc-terms-website .contract-doc-terms-heading,
.contract-doc-terms-website .contract-doc-terms-paragraph,
.contract-doc-terms-website .contract-doc-terms-table-caption,
.contract-doc-terms-transfer .contract-doc-terms-heading,
.contract-doc-terms-transfer .contract-doc-terms-paragraph,
.contract-doc-terms-transfer .contract-doc-terms-table-caption {
    font-size: 0.5625rem;
}

.contract-doc-terms-website .contract-doc-terms-table,
.contract-doc-terms-transfer .contract-doc-terms-table {
    font-size: 0.5rem;
}

.reg-shell-transfer .reg-panel-step2 .reg-panel-head-compact h2,
.reg-shell-transfer .reg-panel-step2 .reg-step-2-text,
.reg-shell-transfer .reg-step-2-intro p {
    font-weight: 400;
}

.reg-shell-transfer .reg-panel-step2 .reg-panel-head-compact h2 {
    font-size: 0.8125rem;
}

.reg-shell-transfer .reg-panel-step2 .reg-step-2-text {
    font-size: 0.625rem;
    line-height: 1.35;
}

.reg-shell-transfer .reg-step-2-intro p {
    font-size: 0.6875rem;
    line-height: 1.4;
}

.reg-summary-card {
    margin-top: 0.5rem;
    padding: 0;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    background: #fff;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.reg-panel-step1 .reg-summary-list-item {
    padding: 0.625rem 0.875rem;
}

.reg-panel-step1 .reg-summary-value {
    font-size: 0.875rem;
}

.reg-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reg-summary-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--karvi-border);
    text-align: left;
}

.reg-summary-list-item:last-child {
    border-bottom: 0;
}

.reg-summary-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #71717a;
    text-align: left;
}

.reg-summary-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--karvi-black);
    word-break: break-word;
    text-align: left;
}

.reg-info-box,
.reg-legal-block {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: #fafafa;
    border: 1px solid var(--karvi-border);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #52525b;
}

.reg-info-box {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.reg-legal-block p + p {
    margin-top: 0.75rem;
}

.reg-legal-block-compact {
    display: grid;
    gap: 0.75rem;
}

.reg-modal-dialog-sm {
    width: min(24rem, 100%);
    height: auto;
    max-height: none;
}

.reg-pdf-required-body {
    padding: 1.25rem 1rem 0.5rem;
    text-align: center;
}

.reg-pdf-required-icon {
    display: block;
    margin: 0 auto 0.75rem;
    font-size: 2.5rem;
    color: var(--karvi-950);
}

.reg-pdf-required-body p {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #52525b;
}

.reg-pdf-required-foot {
    padding: 1rem;
}

.reg-pdf-card:focus-visible {
    outline: 2px solid var(--karvi-950);
    outline-offset: 2px;
}

.reg-panel-step2 {
    gap: 0;
    flex: 1 1 0;
    min-height: 0;
    justify-content: flex-start;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reg-panel-head-step2,
.reg-panel-step2 .reg-panel-head-compact {
    flex-shrink: 0;
    padding: 0.65rem 0 0.85rem;
    border-bottom: 1px solid #ececee;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.reg-offer-select {
    flex-shrink: 0;
    margin: 0.65rem 0 0.55rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.85rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reg-offer-select.is-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px #dc2626;
}

.reg-offer-select.is-error .reg-offer-select-title,
.reg-offer-select.is-error .reg-offer-select-sub {
    color: #dc2626;
}

.reg-offer-select.is-error .reg-offer-select-icon {
    background: #dc2626;
}

.reg-offer-select.is-shake {
    animation: reg-offer-shake 0.45s ease;
}

@keyframes reg-offer-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
}

.reg-offer-select-head {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.reg-offer-select-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    background: #18181b;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.reg-offer-select-title {
    margin: 0;
    font-family: var(--font-display, inherit);
    font-size: 0.9rem;
    font-weight: 700;
    color: #18181b;
    line-height: 1.3;
}

.reg-offer-select-sub {
    display: block;
    margin: 0.15rem 0 0;
    font-size: 0.7rem;
    color: #71717a;
    line-height: 1.4;
}

.reg-offer-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reg-offer-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.7rem;
    border: 1.5px solid #e4e4e7;
    border-radius: 0.75rem;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.reg-offer-card:hover {
    border-color: #a1a1aa;
    background: #fff;
}

.reg-offer-card.is-selected,
.reg-offer-card[aria-pressed="true"] {
    border-color: #18181b;
    box-shadow: 0 0 0 1px #18181b;
    background: #fff;
}

.reg-offer-card-check {
    font-size: 1.25rem;
    color: #a1a1aa;
    line-height: 1;
    margin-top: 0.05rem;
    flex-shrink: 0;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.reg-offer-card.is-selected .reg-offer-card-check {
    color: #18181b;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.reg-offer-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.reg-offer-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.reg-offer-card-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #52525b;
    background: #f4f4f5;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    flex-shrink: 0;
}

.reg-offer-card.is-selected .reg-offer-card-badge {
    color: #fff;
    background: #18181b;
}

.reg-offer-card-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #18181b;
    line-height: 1.3;
}

.reg-offer-card-meta {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: #52525b;
    line-height: 1.35;
}

.reg-offer-card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.35;
    color: #3f3f46;
}

.reg-offer-card-note {
    display: none;
}

.reg-offer-card-price {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #18181b;
    line-height: 1.3;
}

.reg-panel-step2 .reg-panel-head-compact h2 {
    font-size: 0.875rem;
    line-height: 1.35;
    margin: 0;
}

.reg-panel-step2 .reg-step-2-text {
    font-size: 0.6875rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.reg-shell-partner .reg-header-logo {
    height: 3.75rem;
    max-width: min(280px, 72vw);
}

.reg-shell-partner .reg-panel-step2 .reg-panel-head-compact h2 {
    font-size: 1.125rem;
    line-height: 1.4;
    margin: 0;
}

.reg-shell-partner .reg-panel-step2 .reg-step-2-text {
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-top: 0.5rem;
}

.reg-shell-partner .reg-panel-step2 .reg-panel-head-compact,
.reg-shell-partner .reg-panel-head-step2 {
    padding: 0.45rem 0 0.65rem;
    margin-bottom: 0.35rem;
}

.reg-step-2-intro {
    margin-top: 0.75rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.reg-step-2-intro p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #52525b;
}

.reg-shell-transfer .reg-header-title,
.reg-shell-transfer .reg-header h1 {
    font-size: clamp(1.25rem, 3.8vw, 1.5rem);
}

.reg-doc-email-field {
    margin: 0 0 0.875rem;
    padding: 0.875rem 1rem;
    border: 1px solid #ececee;
    border-radius: 0.875rem;
    background: #fafafb;
}

.reg-doc-email-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1a1a1f;
    margin-bottom: 0.5rem;
}

.reg-doc-email-input {
    width: 100%;
}

.reg-doc-email-hint {
    margin: 0.5rem 0 0;
    font-size: 0.6875rem;
    line-height: 1.55;
    color: #6b6b76;
}

html:has(body.reg-step-doc-active),
body.reg-page.reg-step-doc-active {
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.reg-page.reg-step-doc-active main {
    flex: 1 1 0;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

.reg-shell.reg-shell-step2 {
    --reg-footer-offset: calc(3.75rem + env(safe-area-inset-bottom));
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    flex: 1 1 0;
    padding: 0.5rem 1rem 0;
    overflow: hidden;
}

.reg-shell.reg-shell-step2 .reg-header {
    flex-shrink: 0;
    padding-bottom: 0.875rem;
    margin-bottom: 0.25rem;
    border-bottom: none;
}

.reg-shell.reg-shell-step2.reg-shell-newweb .reg-header {
    padding-bottom: 0.5rem;
}

.reg-shell.reg-shell-step2.reg-shell-newweb .reg-header-title,
.reg-shell.reg-shell-step2.reg-shell-newweb .reg-header > p {
    display: none;
}

.reg-shell.reg-shell-step2 .reg-header-brand {
    margin-bottom: 0.625rem;
}

.reg-shell.reg-shell-step2 .reg-main {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    margin-top: 0.375rem;
    padding-bottom: var(--reg-footer-offset);
    display: flex;
    flex-direction: column;
}

.reg-shell.reg-shell-step2 .reg-doc-card {
    margin-bottom: 0;
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.reg-shell.reg-shell-step2 .reg-doc-scroll {
    padding-bottom: 0.75rem;
}

.reg-shell.reg-shell-step2 .reg-panel-step2 {
    flex: 1 1 0;
    min-height: 0;
}

.reg-shell.reg-shell-step2 .reg-doc-card {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: none;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.reg-docs-split {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.15rem;
    margin-bottom: 0;
}

.reg-doc-pane {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reg-doc-pane-main {
    flex: 1 1 0;
}

.reg-doc-pane-lieferando {
    display: none;
}

.reg-doc-pane-title {
    flex-shrink: 0;
    margin: 0 0 0.3rem;
    padding: 0 0.1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #71717a;
}

.reg-doc-pane .reg-doc-card {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

.reg-doc-followon {
    margin: 0.35rem 0.55rem 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e4e4e7;
}

.reg-doc-followon-title {
    margin: 0 0 0.65rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #71717a;
}

.reg-doc-card-lieferando {
    padding: 0;
    background: #fff;
    overflow: hidden;
}

.reg-lieferando-frame {
    display: none;
}

.reg-shell-partner.reg-shell-step2 .reg-main {
    padding-bottom: calc(3.85rem + env(safe-area-inset-bottom));
}

.reg-shell-partner.reg-shell-step2 .reg-doc-card {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    max-height: none;
}

.reg-shell-partner .reg-doc-scroll .contract-doc {
    font-size: 0.625rem;
    color: #52525b;
    padding: 0.75rem 0.65rem 1rem;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-title {
    font-size: 0.75rem;
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-meta {
    font-size: 0.625rem;
    color: #71717a;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-block-title {
    font-size: 0.6875rem;
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-block-title-sm,
.reg-shell-partner .reg-doc-scroll .contract-doc-block-subtitle,
.reg-shell-partner .reg-doc-scroll .contract-doc-mini-title,
.reg-shell-partner .reg-doc-scroll .contract-doc-panel-title {
    font-size: 0.625rem;
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-note,
.reg-shell-partner .reg-doc-scroll .contract-doc-divider {
    font-size: 0.5625rem;
    color: #a1a1aa;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-field dt {
    color: #a1a1aa;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-field dd,
.reg-shell-partner .reg-doc-scroll .contract-doc-rows li {
    font-size: 0.625rem;
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-row-label {
    color: #71717a;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-row-value {
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-customer-plain-item {
    font-size: 0.8125rem;
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-customer-card-value {
    font-size: 0.8125rem;
    color: #3f3f46;
}

.reg-shell-partner .reg-doc-scroll .contract-doc-customer-card-label,
.reg-shell-partner .reg-doc-scroll .contract-doc-customer-sub {
    color: #a1a1aa;
}

@media (max-width: 720px) {
    .reg-docs-split {
        gap: 0.4rem;
    }

    .reg-doc-pane-title,
    .reg-doc-followon-title {
        font-size: 0.625rem;
    }
}

.reg-doc-card {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    background: #fff;
    overflow: hidden;
    position: relative;
}

.reg-doc-card.is-viewed {
    border-color: var(--karvi-border);
    background: #fff;
}

.reg-doc-scroll {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 0.5rem;
    background: #fff;
}

.contract-doc {
    width: 100%;
    margin: 0;
    padding: 0.875rem 0.75rem 1.25rem;
    background: #fff;
    color: #3f3f46;
    font-size: 0.6875rem;
    line-height: 1.3;
}

.contract-doc-page-one-website {
    font-size: 0.625rem;
    line-height: 1.3;
    font-weight: 400;
}

.contract-doc-page-one-website .contract-doc-block {
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
}

.contract-doc-page-one-website .contract-doc-block-title,
.contract-doc-page-one-website .contract-doc-block-title-sm,
.contract-doc-page-one-website .contract-doc-block-title-plain {
    margin: 0 0 0.4rem;
    font-size: 0.625rem;
    font-weight: 400;
    color: #18181b;
}

.contract-doc-page-one-website .contract-doc-customer-header {
    margin-bottom: 0.45rem;
    gap: 0.5rem;
}

.contract-doc-page-one-website .contract-doc-customer-header-icon {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.45rem;
}

.contract-doc-page-one-website .contract-doc-customer-header-icon .material-symbols-rounded {
    font-size: 0.9rem;
}

.contract-doc-page-one-website .contract-doc-customer-sub {
    margin: 0.1rem 0 0;
    font-size: 0.625rem;
    line-height: 1.25;
    font-weight: 400;
}

.contract-doc-page-one-website .contract-doc-customer-plain-item {
    padding: 0.05rem 0;
    font-size: 0.625rem;
    font-weight: 400;
    line-height: 1.25;
    color: #3f3f46;
}

.contract-doc-page-one-website .contract-doc-table,
.contract-doc-page-one-website .contract-doc-table-compact {
    min-width: 0;
    font-size: 0.625rem;
    font-weight: 400;
    table-layout: auto;
}

.contract-doc-page-one-website .contract-doc-table th,
.contract-doc-page-one-website .contract-doc-table td,
.contract-doc-page-one-website .contract-doc-table-compact th,
.contract-doc-page-one-website .contract-doc-table-compact td {
    padding: 0.22rem 0.2rem;
    line-height: 1.25;
    font-size: 0.625rem;
    font-weight: 400;
}

.contract-doc-page-one-website .contract-doc-table thead th,
.contract-doc-page-one-website .contract-doc-table-compact thead th {
    font-size: 0.625rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: #52525b;
    padding-top: 0.2rem;
    padding-bottom: 0.25rem;
}

.contract-doc-page-one-website .contract-doc-table col.contract-doc-col-index,
.contract-doc-page-one-website .contract-doc-table .contract-doc-col-index {
    width: 1.4rem;
}

.contract-doc-page-one-website .contract-doc-table col.contract-doc-col-money {
    width: 4.75rem;
}

.contract-doc-page-one-website .contract-doc-totals {
    margin-top: 0.35rem;
}

.contract-doc-page-one-website .contract-doc-totals .pos-totals-row {
    padding: 0.12rem 0;
    font-size: 0.625rem;
    line-height: 1.25;
}

.contract-doc-page-one-website .contract-doc-totals .pos-totals-row,
.contract-doc-page-one-website .contract-doc-totals .pos-totals-row span {
    font-size: 0.625rem;
    font-weight: 400;
    color: #3f3f46;
}

.contract-doc-page-one-website .contract-doc-totals .contract-doc-totals-net,
.contract-doc-page-one-website .contract-doc-totals .contract-doc-totals-net span {
    font-size: 0.75rem;
    font-weight: 700 !important;
    color: #18181b !important;
    line-height: 1.3;
}

.contract-doc-hero {
    margin-bottom: 0.875rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f4f4f5;
}

.contract-doc-title {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    color: #18181b;
    letter-spacing: -0.01em;
}

.contract-doc-meta {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.35;
    color: #52525b;
}

.contract-doc-old-customer {
    margin-top: 0.375rem;
    font-style: italic;
    color: #71717a;
}

.contract-doc-block-subtitle {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #18181b;
}

.contract-doc-row-complete td {
    color: #a1a1aa;
}

.contract-doc-row-pending td {
    font-weight: 600;
    color: #18181b;
}

.contract-doc-row-pending .contract-doc-col-status {
    font-weight: 600;
}

.contract-doc-divider {
    margin: 0.625rem 0;
    text-align: center;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a1a1aa;
}

.contract-doc-block {
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #f4f4f5;
}

.contract-doc-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contract-doc-block-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #18181b;
}

.contract-doc-block-title-plain {
    margin-bottom: 0.5rem;
}

.contract-doc-block-title-sm {
    font-size: 0.6875rem;
}

.contract-doc-block-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #18181b;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contract-doc-copy p {
    margin: 0 0 0.2rem;
}

.contract-doc-note {
    margin-top: 0.375rem !important;
    color: #71717a;
    font-size: 0.625rem;
}

.contract-doc-fields {
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.contract-doc-field {
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    background: #fafafa;
}

.contract-doc-field dt {
    margin: 0 0 0.125rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.contract-doc-field dd {
    margin: 0;
    font-size: 0.6875rem;
    color: #18181b;
    word-break: break-word;
}

.contract-doc-customer-section {
    margin-top: 0.25rem;
}

.contract-doc-customer-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.contract-doc-customer-header-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: #18181b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contract-doc-customer-header-icon .material-symbols-rounded {
    font-size: 1.15rem;
}

.contract-doc-customer-sub {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: #71717a;
    line-height: 1.25;
}

.contract-doc-customer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e4e4e7;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
}

.contract-doc-customer-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid #f0f0f2;
}

.contract-doc-customer-list-item:last-child {
    border-bottom: none;
}

.contract-doc-customer-list-item:nth-child(even) {
    background: #fafafa;
}

.contract-doc-customer-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    background: #f4f4f5;
    color: #18181b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contract-doc-customer-card-icon .material-symbols-rounded {
    font-size: 1.05rem;
}

.contract-doc-customer-card-body {
    min-width: 0;
    flex: 1;
}

.contract-doc-customer-card-label {
    margin: 0 0 0.2rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contract-doc-customer-card-value {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #18181b;
    line-height: 1.35;
    word-break: break-word;
}

.contract-doc-customer-plain {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contract-doc-customer-plain-item {
    margin: 0;
    padding: 0.08rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #18181b;
    line-height: 1.2;
    word-break: break-word;
}

.contract-doc-panel {
    margin-bottom: 0.625rem;
    border: 1px solid #ececee;
    border-radius: 0.625rem;
    overflow: hidden;
    background: #fafafa;
}

.contract-doc-panel-title {
    margin: 0;
    padding: 0.5rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #18181b;
    background: #f4f4f5;
}

.contract-doc-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contract-doc-rows li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.4375rem 0.625rem;
    border-top: 1px solid #ececee;
    font-size: 0.6875rem;
}

.contract-doc-row-label {
    flex: 1;
    color: #52525b;
}

.contract-doc-row-value {
    flex-shrink: 0;
    font-weight: 600;
    color: #18181b;
    text-align: right;
}

.contract-doc-mini-title {
    margin: 0.75rem 0 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #18181b;
}

.contract-doc-bullets {
    margin: 0;
    padding-left: 1rem;
}

.contract-doc-bullets li {
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.contract-doc-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.contract-doc-item-num {
    flex-shrink: 0;
    min-width: 2.85rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #71717a;
    padding-top: 0.05rem;
}

.contract-doc-item-body {
    flex: 1;
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.3;
    color: #3f3f46;
}

.contract-doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.contract-doc-tags li {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #e4e4e7;
    background: #fff;
    font-size: 0.625rem;
    color: #71717a;
}

.contract-doc-tags li.is-active {
    border-color: #18181b;
    background: #18181b;
    color: #fff;
    font-weight: 600;
}

.contract-doc-brand-check {
    font-size: 0.875rem;
    line-height: 1;
    font-weight: 700;
}

.contract-doc-block-sign {
    padding-top: 0.25rem;
}

.contract-doc-sign-grid {
    display: grid;
    gap: 0.5rem;
}

.contract-doc-sign-card {
    padding: 0.625rem;
    border-radius: 0.625rem;
    background: #fafafa;
    font-size: 0.625rem;
    color: #52525b;
}

.contract-doc-sign-card p {
    margin: 0 0 0.2rem;
}

.contract-doc-sign-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #18181b !important;
    margin-bottom: 0.25rem !important;
}

.contract-doc-sign-space {
    height: 2rem;
    margin: 0.375rem 0 0.25rem;
    border-bottom: 1px solid #d4d4d8;
}

.contract-doc-sign-date {
    font-size: 0.625rem;
    color: #71717a;
}

.reg-pdf-card {
    flex: 1;
    min-height: 0;
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    border: 2px dashed #d4d4d8;
    border-radius: var(--radius-xl);
    background: #fff;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.reg-pdf-card:active {
    transform: scale(0.995);
    background: #fafafa;
}

.reg-pdf-card.is-viewed {
    border-style: solid;
    border-color: #16a34a;
    background: #f0fdf4;
}

.reg-pdf-card-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.25rem;
    gap: 0.625rem;
}

.reg-pdf-card-status {
    flex-shrink: 0;
    padding: 0 1rem 1rem;
}

.reg-pdf-card .reg-pdf-viewed {
    margin-top: 0;
}

.reg-pdf-icon {
    width: 5.5rem;
    height: 5.5rem;
    margin: 0;
    border-radius: 1.25rem;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reg-pdf-icon .material-symbols-rounded {
    font-size: 3rem;
    color: var(--karvi-950);
}

.reg-pdf-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--karvi-black);
}

.reg-pdf-card-hint {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #52525b;
    max-width: 20rem;
}

.reg-pdf-card-tap {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: var(--karvi-950);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
}

.reg-pdf-card.is-viewed .reg-pdf-card-tap {
    background: #16a34a;
}

.reg-pdf-card p {
    margin-top: 0;
    font-size: 0.875rem;
    color: #71717a;
}

.reg-pdf-card .btn-primary {
    margin-top: 1.25rem;
}

.reg-pdf-viewed {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.reg-owner-progress {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--karvi-500, #6b7280);
    text-align: center;
    flex-shrink: 0;
}

.reg-owner-progress.hidden {
    display: none;
}

.reg-shell-step3 {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

.reg-panel-step3 {
    flex: 1;
    min-height: 0;
}

.reg-panel-step3 .reg-sign-form,
.reg-panel-step3 .reg-sign-choice {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reg-panel-step3 .reg-signer-name {
    flex-shrink: 0;
    margin: 0.75rem 0 1rem;
    text-align: center;
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--karvi-black);
    word-break: break-word;
}

.reg-sign-method-grid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reg-sign-method-btn {
    flex: 1;
    min-height: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    border: 2px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    background: #fff;
    color: var(--karvi-black);
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.reg-sign-method-btn .material-symbols-rounded {
    font-size: 2rem;
}

.reg-sign-method-btn:hover {
    border-color: var(--karvi-black);
    background: #fafafa;
}

.reg-sign-upload-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reg-sign-upload-panel.hidden {
    display: none;
}

.reg-sign-upload-simple {
    flex: 1;
    min-height: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 2px dashed #d4d4d8;
    border-radius: var(--radius-xl);
    background: #fafafa;
    color: var(--karvi-black);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}

.reg-sign-upload-simple:hover {
    border-color: var(--karvi-black);
}

.reg-sign-upload-simple .material-symbols-rounded {
    font-size: 2.5rem;
    color: #71717a;
}

.reg-sign-upload-simple input[type="file"] {
    display: none;
}

.reg-sign-upload-preview {
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: contain;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    background: #fff;
}

.reg-sign-upload-preview.hidden {
    display: none;
}

.reg-sign-draw-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reg-sign-draw-panel.hidden {
    display: none;
}

.reg-sign-draw-stage-inline {
    flex: 1;
    min-height: 12rem;
    position: relative;
    background: #fff;
    display: flex;
}

.reg-sign-draw-stage-inline .reg-sign-draw-frame {
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
    border: 2px dashed #a1a1aa;
    border-radius: var(--radius-lg);
    background: #fafafa;
    overflow: hidden;
}

.reg-sign-draw-stage-inline .reg-sign-draw-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #d4d4d8;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

.reg-sign-draw-stage-inline .reg-sign-draw-hint.hidden {
    display: none;
}

.reg-sign-draw-stage-inline .signature-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    touch-action: none;
    cursor: crosshair;
    z-index: 1;
}

.reg-sign-draw-clear {
    flex-shrink: 0;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--karvi-black);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.reg-sign-draw-clear:hover {
    background: #f4f4f5;
}

.reg-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 15% 85%;
    gap: 0.75rem;
    padding: 0.875rem 1rem calc(0.875rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--karvi-border);
    backdrop-filter: blur(8px);
}

.reg-footer:has(.reg-footer-back.hidden) {
    grid-template-columns: 1fr;
}

.reg-footer-back,
.reg-footer-action {
    min-width: 0;
    justify-content: center;
}

.reg-footer-back {
    padding-left: 0;
    padding-right: 0;
}

.reg-footer-back .material-symbols-rounded {
    font-size: 1.375rem;
}

.reg-footer .btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.reg-success-card {
    text-align: center;
    padding: 2rem 1rem;
}

.reg-menu-downloads {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.reg-menu-downloads-title {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--karvi-950, #18181b);
}

.reg-menu-download-btn {
    min-width: min(100%, 18rem);
}

.reg-menu-download-btn .material-symbols-rounded {
    font-size: 1.25rem;
}

.reg-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.reg-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.reg-modal-dialog {
    position: relative;
    width: min(960px, 100%);
    height: min(88vh, 760px);
    background: #fff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.reg-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--karvi-border);
}

.reg-modal-head h3 {
    font-size: 0.9375rem;
    font-weight: 700;
}

.reg-modal-frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #f4f4f5;
    min-height: 0;
}

.reg-modal-mobile {
    padding: 0;
    align-items: stretch;
}

.reg-modal-mobile .reg-modal-dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
}

.reg-modal-mobile .reg-modal-frame {
    -webkit-overflow-scrolling: touch;
}

/* Location gate — blocks all contract content until GPS granted */
body.reg-location-pending {
    overflow: hidden;
}

body.reg-location-pending > footer {
    display: none;
}

body.reg-location-pending #regPdfViewer {
    display: none !important;
}

/* Self-hosted PDF.js viewer (all devices) */
body.reg-pdf-viewer-open {
    overflow: hidden;
}

.reg-pdf-viewer {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    background: #525659;
}

.reg-pdf-viewer-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid var(--karvi-border);
}

.reg-pdf-viewer-head h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--karvi-950);
}

.reg-pdf-viewer-host {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0.5rem 1rem;
}

.reg-pdf-page-canvas {
    display: block;
    width: calc(100% - 0.5rem);
    max-width: 920px;
    height: auto;
    margin: 0 auto 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    background: #fff;
}

.reg-pdf-viewer-status {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: #fff;
    font-size: 0.875rem;
    text-align: center;
}

.reg-pdf-viewer-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    color: #fff;
    text-align: center;
}

.reg-pdf-viewer-error p {
    font-size: 0.875rem;
    line-height: 1.5;
}

.reg-pdf-viewer-foot {
    flex-shrink: 0;
    padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--karvi-border);
}

.reg-pdf-viewer-done {
    width: 100%;
    justify-content: center;
}

body.reg-pdf-view-page main {
    flex: 1;
    min-height: 0;
    max-width: none;
    width: 100%;
    padding: 0;
}

.reg-pdf-view-page-shell {
    min-height: calc(100dvh - 4rem);
    display: flex;
    flex-direction: column;
    background: #525659;
}

.reg-pdf-view-page-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid var(--karvi-border);
}

.reg-pdf-view-page-head h1 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--karvi-950);
}

.reg-pdf-view-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: #f4f4f5;
    color: var(--karvi-950);
    text-decoration: none;
}

.reg-location-gate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--karvi-bg, #fafafa);
}

.reg-location-gate-inner {
    max-width: 28rem;
    width: 100%;
    text-align: center;
    margin: auto;
    padding: 1.5rem 1.25rem 1.35rem;
    border-radius: var(--radius-xl, 1.25rem);
    background: #fff;
    border: 1px solid var(--karvi-border, #e4e4e7);
    box-shadow: var(--shadow-soft, 0 4px 24px rgba(0, 0, 0, 0.06));
}

.reg-location-icon {
    font-size: 2.5rem;
    color: var(--karvi-950, #0a0a0a);
    margin-bottom: 0.5rem;
}

.reg-location-message {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--karvi-500, #71717a);
}

.reg-location-spinner {
    width: 2rem;
    height: 2rem;
    margin: 1rem auto 0;
    border: 3px solid var(--karvi-200, #e4e4e7);
    border-top-color: var(--karvi-950, #0a0a0a);
    border-radius: 50%;
    animation: reg-location-spin 0.8s linear infinite;
}

.reg-location-spinner.hidden {
    display: none;
}

.reg-location-retry {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
}

.reg-location-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0 0.9rem;
    color: var(--karvi-400, #a1a1aa);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.reg-location-divider::before,
.reg-location-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--karvi-200, #e4e4e7);
}

.reg-location-search {
    display: flex;
    gap: 0.5rem;
    text-align: left;
}

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

.reg-location-search-btn {
    flex-shrink: 0;
    justify-content: center;
}

.reg-location-results {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    text-align: left;
    max-height: 9.5rem;
    overflow-y: auto;
    border: 1px solid var(--karvi-200, #e4e4e7);
    border-radius: 0.75rem;
    background: #fff;
}

.reg-location-result {
    display: block;
    width: 100%;
    padding: 0.7rem 0.85rem;
    text-align: left;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--karvi-800, #27272a);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--karvi-100, #f4f4f5);
    cursor: pointer;
}

.reg-location-result:hover,
.reg-location-result:focus {
    background: var(--karvi-50, #fafafa);
}

.reg-location-result:last-child {
    border-bottom: 0;
}

.reg-location-map-hint {
    margin: 0.85rem 0 0.5rem;
    font-size: 0.75rem;
    color: var(--karvi-500, #71717a);
}

.reg-location-map {
    width: 100%;
    height: 13.5rem;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--karvi-200, #e4e4e7);
    z-index: 1;
}

.reg-location-selected {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--karvi-800, #27272a);
    text-align: left;
}

.reg-location-confirm {
    margin-top: 0.85rem;
    width: 100%;
    justify-content: center;
}

@keyframes reg-location-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Temporary sign API debug modal */
.reg-api-debug-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.reg-api-debug-modal.hidden {
    display: none;
}

.reg-api-debug-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.55);
}

.reg-api-debug-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 42rem);
    max-height: min(88vh, 720px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--karvi-border);
    border-radius: 1rem;
    box-shadow: 0 24px 64px -20px rgba(0, 0, 0, 0.35);
    padding: 1rem 1rem 1.25rem;
}

.reg-api-debug-head h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--karvi-950);
    margin: 0 0 0.35rem;
}

.reg-api-debug-summary {
    margin: 0;
    font-size: 0.82rem;
    color: var(--karvi-600, #52525b);
    line-height: 1.45;
}

.reg-api-debug-summary.is-error {
    color: #b42318;
}

/* Website contract form */
.website-line-items-table td,
.website-line-items-table th {
    vertical-align: middle;
}

.website-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0.5rem;
}

.website-remove-btn:hover {
    background: #fef2f2;
}

.website-totals-block {
    margin-left: auto;
    max-width: 20rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.website-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #3f3f46;
    gap: 1rem;
}

.website-totals-row.website-totals-final {
    font-weight: 700;
    font-size: 1rem;
    color: #0a0a0a;
    padding-top: 0.5rem;
    border-top: 1px solid #e4e4e7;
    margin-top: 0.25rem;
}

.website-discount-input {
    width: 5.5rem;
    text-align: right;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.website-date-input {
    padding-right: 2.5rem !important;
}

.invoice-date-input {
    padding-right: 2.75rem !important;
}

.invoice-date-open {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.invoice-date-field .datepicker {
    z-index: 50;
}

.invoice-form-card {
    padding: 1rem 1.125rem;
}

@media (min-width: 640px) {
    .invoice-form-card {
        padding: 1.25rem 1.5rem;
    }
}

.invoice-form-section + .invoice-form-section {
    margin-top: 1.125rem;
    padding-top: 1.125rem;
    border-top: 1px solid var(--karvi-border);
}

.invoice-form-section-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.invoice-form-section-head--split {
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.invoice-form-section-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.invoice-form-section-icon .material-symbols-rounded {
    font-size: 1.125rem;
}

.invoice-form-section-title {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0a0a0a;
}

.invoice-form-section-sub {
    font-size: 0.6875rem;
    line-height: 1.35;
    color: #71717a;
    margin-top: 0.125rem;
}

.invoice-form-grid {
    gap: 0.75rem;
}

.invoice-form .form-label {
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
}

.invoice-form .form-input {
    padding-top: 0.5625rem;
    padding-bottom: 0.5625rem;
}

.invoice-intro-input {
    min-height: 4.5rem;
}

.invoice-form-submit {
    margin-top: 1.25rem;
}

.reg-api-debug-content {
    margin: 0.85rem 0 1rem;
    padding: 0.75rem;
    background: #f8f8f8;
    border: 1px solid #e4e4e7;
    border-radius: 0.65rem;
    font-size: 0.68rem;
    line-height: 1.45;
    overflow: auto;
}

/* POS contract form */
.pos-line-items-wrap {
    overflow: visible;
}

.pos-line-items-table th,
.pos-line-items-table td {
    vertical-align: middle;
}

.pos-line-items-table td:has(.pos-desc-combo) {
    overflow: visible;
    position: relative;
}

.pos-line-items-table .form-input {
    font-size: 0.875rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.pos-line-items-table td.py-1\.5 {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.pos-desc-combo {
    position: relative;
    width: 100%;
}

.pos-desc-combo-field {
    position: relative;
    display: block;
    width: 100%;
}

.pos-desc-combo .pos-description,
.pos-desc-combo .invoice-description,
.pos-desc-combo .pending-description,
.pos-desc-combo .invoice-customer-search {
    width: 100%;
    padding-right: 2.25rem;
}

.pos-desc-combo-toggle {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--karvi-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    pointer-events: auto;
}

.pos-desc-combo-toggle:hover {
    color: var(--karvi-950);
}

.pos-desc-combo-toggle svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.pos-desc-combo-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 50;
    width: max(100%, 20rem);
    min-width: 20rem;
    max-height: 14rem;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: white;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pos-desc-combo-menu li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.pos-desc-combo-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-desc-combo-price {
    justify-self: end;
    min-width: 5.75rem;
    text-align: right;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--karvi-muted);
    white-space: nowrap;
}

.pos-desc-combo-empty {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    color: var(--karvi-muted);
    cursor: default;
}

.pos-desc-combo-menu li:hover,
.pos-desc-combo-menu li:focus {
    background: var(--karvi-100);
}

.pos-desc-combo-menu li.hidden {
    display: none;
}

.pos-unit-price-wrap {
    position: relative;
}

.pos-unit-price-wrap .pos-unit-euro {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--karvi-muted);
    pointer-events: none;
}

.pos-unit-price-wrap .pos-unit-net {
    padding-right: 2rem;
}

.pos-remove-item {
    width: 2rem;
    height: 2rem;
    border: 1.5px solid var(--karvi-border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--karvi-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pos-remove-item:hover {
    border-color: #fca5a5;
    color: #dc2626;
    background: #fef2f2;
}

.pos-totals-block {
    margin-left: auto;
    max-width: 20rem;
    border-top: 1px solid var(--karvi-border);
    padding-top: 1rem;
}

.pos-totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    color: var(--karvi-muted);
}

.pos-totals-row span:last-child {
    font-weight: 600;
    color: var(--karvi-black);
    white-space: nowrap;
}

.pos-totals-discount .pos-discount-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pos-totals-discount .pos-money-input {
    width: 5.5rem;
    text-align: right;
    padding: 0.35rem 0.5rem;
    font-size: 0.875rem;
}

.pos-currency-prefix {
    font-size: 0.8rem;
    color: var(--karvi-muted);
}

.pos-totals-final {
    border-top: 1px solid var(--karvi-border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-size: 1rem;
}

.pos-totals-final span {
    font-weight: 700 !important;
    color: var(--karvi-black) !important;
}

.contract-doc-totals {
    margin-top: 0.5rem;
}

.contract-doc-totals .pos-totals-row {
    padding: 0.22rem 0;
    line-height: 1.25;
}

.contract-doc-totals .pos-totals-row,
.contract-doc-totals .pos-totals-row span {
    font-weight: 400;
    color: var(--karvi-muted);
}

.contract-doc-totals .pos-totals-row span:last-child {
    font-weight: 400;
    color: var(--karvi-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.contract-doc-totals-net,
.contract-doc-totals-net span {
    font-weight: 700;
    color: var(--karvi-black);
}

.contract-doc-totals-net span:last-child {
    font-weight: 700 !important;
    color: var(--karvi-black) !important;
}

.contract-doc-totals .contract-doc-totals-net,
.contract-doc-totals .contract-doc-totals-net span {
    font-size: 1rem;
    font-weight: 700 !important;
    color: var(--karvi-black) !important;
}

.pos-money-input {
    font-variant-numeric: tabular-nums;
}

.reg-api-debug-content {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
    color: #18181b;
}

.settings-nav-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--karvi-white);
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 4px 24px -4px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    text-decoration: none;
    color: inherit;
    min-height: 12rem;
}

.settings-nav-card:hover {
    border-color: var(--karvi-300);
    box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.settings-nav-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    background: var(--karvi-950);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-nav-card-title {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--karvi-950);
}

.settings-nav-card-desc {
    font-size: 0.875rem;
    color: var(--karvi-500);
    line-height: 1.5;
    flex: 1;
}

.settings-nav-card-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--karvi-950);
}

.settings-nav-card-disabled {
    cursor: default;
    opacity: 0.92;
    border-style: dashed;
    border-color: var(--karvi-300);
    box-shadow: none;
}

.settings-nav-card-disabled:hover {
    transform: none;
    border-color: var(--karvi-300);
    box-shadow: none;
}

.settings-nav-card-static {
    cursor: default;
}

.settings-nav-card-static:hover {
    transform: none;
}

.settings-nav-card-icon-muted {
    background: var(--karvi-200);
    color: var(--karvi-600);
}

.home-dashboard-hero {
    padding: 0;
    margin-bottom: clamp(0.85rem, 1.5vh, 1.35rem);
    flex-shrink: 0;
}

.home-dashboard-hero h2 {
    font-size: clamp(1.35rem, 1.1rem + 1.1vw, 2.15rem);
    line-height: 1.2;
}

.home-dashboard-hero p,
.home-dashboard-hero-sub {
    font-size: clamp(0.875rem, 0.8rem + 0.35vw, 1.1rem);
    max-width: min(42rem, 100%);
    line-height: 1.45;
}

body.page-home-dashboard .flex-1.lg\:ml-72 > main {
    padding-top: clamp(1.25rem, 2vh, 2rem);
    padding-bottom: clamp(0.75rem, 1.5vh, 1.25rem);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.page-home-dashboard .flex-1.lg\:ml-72 > footer {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.home-dashboard-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: min(90rem, 100%);
    width: 100%;
    min-height: 0;
}

.home-dashboard-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.2vw, 1.35rem);
    min-height: 0;
    align-content: stretch;
}

@media (max-width: 1023px) {
    .home-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .home-dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    body.page-home-dashboard .flex-1.lg\:ml-72 > main {
        overflow-y: auto;
    }
}

.home-dashboard-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(0.5rem, 0.9vw, 0.9rem);
    padding: clamp(1rem, 1.6vw, 1.85rem);
    background: #fff;
    border: 2px solid #71717a;
    border-radius: clamp(1rem, 1.2vw, 1.35rem);
    box-shadow: 0 4px 18px -10px rgba(0, 0, 0, 0.12);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    text-decoration: none;
    color: inherit;
    min-height: 0;
    height: 100%;
}

.home-dashboard-card:hover {
    border-color: var(--karvi-black);
    box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.home-dashboard-card-icon {
    width: clamp(2.5rem, 2rem + 1.2vw, 3.75rem);
    height: clamp(2.5rem, 2rem + 1.2vw, 3.75rem);
    border-radius: clamp(0.75rem, 0.9vw, 1rem);
    background: var(--karvi-black);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-dashboard-card-icon .material-symbols-rounded {
    font-size: clamp(1.35rem, 1.1rem + 0.7vw, 2rem);
    line-height: 1;
}

.home-dashboard-card-title {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-weight: 800;
    font-size: clamp(1rem, 0.88rem + 0.55vw, 1.5rem);
    color: var(--karvi-black);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.home-dashboard-card-desc {
    font-size: clamp(0.8125rem, 0.74rem + 0.35vw, 1.1rem);
    color: var(--karvi-muted);
    line-height: 1.45;
    flex: 0 1 auto;
    max-width: 36em;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-dashboard-card-link {
    font-size: clamp(0.8125rem, 0.74rem + 0.3vw, 1.05rem);
    font-weight: 700;
    color: var(--karvi-black);
    margin-top: clamp(0.35rem, 1.2vh, 1rem);
}

@media (min-width: 1280px) {
    .home-dashboard-card {
        justify-content: center;
        gap: clamp(0.65rem, 1.1vh, 1.1rem);
    }

    .home-dashboard-card-desc {
        -webkit-line-clamp: 5;
    }
}

@media (min-width: 1536px) {
    .home-dashboard-shell {
        max-width: min(96rem, 100%);
    }

    .home-dashboard-card {
        padding: clamp(1.35rem, 1.8vw, 2.15rem);
    }
}

.settings-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--karvi-600);
    text-decoration: none;
}

.settings-back-link:hover {
    color: var(--karvi-950);
}

body.sensitive-page-locked .flex.min-h-screen > .flex-1 {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.sensitive-gate-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    filter: none;
    pointer-events: auto;
}

.sensitive-gate-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(4px);
}

.sensitive-gate-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    background: #fff;
    border: 2px solid #71717a;
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
}

.sensitive-gate-modal-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 1rem;
    background: var(--karvi-black);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sensitive-gate-modal-icon .material-symbols-rounded {
    font-size: 1.75rem;
}

.sensitive-gate-modal-title {
    font-family: 'Plus Jakarta Sans', Inter, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
    color: var(--karvi-black);
    margin-bottom: 0.5rem;
}

.sensitive-gate-modal-sub {
    font-size: 0.875rem;
    color: var(--karvi-muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.sensitive-gate-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sensitive-gate-modal-error {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b91c1c;
    text-align: center;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: end;
}

@media (min-width: 768px) {
    .settings-form-grid {
        grid-template-columns: 1fr minmax(8rem, 10rem) auto;
    }

    .settings-form-grid-team {
        grid-template-columns: 1fr auto;
    }
}

.settings-form-field-grow {
    min-width: 0;
}

.settings-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.settings-row-actions {
    display: inline-flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.settings-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8125rem !important;
}

.settings-inline-alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.settings-inline-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.settings-inline-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.dashboard-contracts-panel {
    position: relative;
    min-height: 4rem;
}

.dashboard-loading-popup {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    pointer-events: none;
}

.dashboard-loading-popup.hidden {
    display: none;
}

.dashboard-loading-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    opacity: 0;
    animation: dashboard-loading-backdrop-in 0.25s ease forwards;
    pointer-events: none;
}

.dashboard-loading-popup-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: min(100%, 15.5rem);
    padding: 1.15rem 1.25rem 1.05rem;
    border-radius: 1.15rem;
    background: var(--karvi-white);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.7) inset,
        0 22px 48px -18px rgba(15, 23, 42, 0.28),
        0 10px 22px -12px rgba(15, 23, 42, 0.16);
    text-align: center;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(14px) scale(0.9);
    animation: dashboard-loading-pop-in 0.38s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

.dashboard-loading-popup-spinner {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.85rem;
    background: var(--karvi-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-loading-popup-spinner .material-symbols-rounded {
    font-size: 1.4rem;
    color: var(--karvi-700);
    animation: dashboard-loading-spin 0.9s linear infinite;
}

.dashboard-loading-popup-text {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--karvi-600);
}

@keyframes dashboard-loading-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dashboard-loading-pop-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dashboard-loading-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.customers-topbar {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.customers-topbar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.customers-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    shrink: 0;
}

.customers-topbar-actions .btn-secondary.is-spinning .material-symbols-rounded,
.customers-topbar-actions .btn-primary.is-spinning .material-symbols-rounded {
    animation: dashboard-loading-spin 0.9s linear infinite;
}

@media (max-width: 639px) {
    .customers-topbar-header {
        flex-direction: column;
        align-items: stretch;
    }

    .customers-topbar-actions {
        width: 100%;
    }

    .customers-topbar-actions .btn-secondary,
    .customers-topbar-actions .btn-primary {
        flex: 1;
        justify-content: center;
    }
}

.customers-topbar-copy {
    min-width: 0;
}

.customers-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.customers-filter-input {
    min-height: 2.125rem;
    padding: 0.35rem 0.625rem;
    border: 1.5px solid #d4d4d8;
    border-radius: 8px;
    background: #fff;
    font-size: 0.8125rem;
    color: var(--karvi-950);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customers-filter-input::placeholder {
    color: var(--karvi-400);
}

.customers-filter-input:hover {
    border-color: var(--karvi-300);
}

.customers-filter-input:focus {
    outline: none;
    border-color: var(--karvi-black);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.customers-filter-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 11rem;
    min-width: 0;
}

.customers-filter-search .material-symbols-rounded {
    position: absolute;
    left: 0.55rem;
    color: var(--karvi-400);
    font-size: 1rem;
    pointer-events: none;
}

.customers-filter-search .customers-filter-input {
    width: 100%;
    padding-left: 2rem;
}

.customers-filter-select {
    flex: 0 1 auto;
    min-width: 7.5rem;
    max-width: 9.5rem;
    appearance: none;
    cursor: pointer;
    padding-right: 1.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%2371717a' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
}

.customers-filter-dates {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 1 auto;
}

.customers-filter-date-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.customers-filter-date {
    width: 6.75rem;
    padding-right: 1.65rem;
}

.customers-filter-date-sep {
    color: var(--karvi-400);
    font-size: 0.75rem;
    line-height: 1;
    user-select: none;
}

.customers-filter-date-btn {
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--karvi-400);
    cursor: pointer;
    padding: 0;
}

.customers-filter-date-btn:hover {
    color: var(--karvi-950);
    background: var(--karvi-100);
}

.customers-filter-date-btn .material-symbols-rounded {
    font-size: 0.95rem;
}

.customers-filter-sort {
    min-width: 8.5rem;
    max-width: 10.5rem;
}

.customers-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    flex-shrink: 0;
    border: 1.5px solid #d4d4d8;
    border-radius: 8px;
    background: #fff;
    color: var(--karvi-600);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.customers-filter-clear:hover {
    border-color: var(--karvi-black);
    background: var(--karvi-50);
    color: var(--karvi-950);
}

.customers-filter-clear .material-symbols-rounded {
    font-size: 1.05rem;
}

@media (max-width: 639px) {
    .customers-filter-search {
        flex-basis: 100%;
    }

    .customers-filter-dates {
        flex: 1 1 auto;
    }

    .customers-filter-date {
        width: 6.25rem;
    }

    .customers-filter-sort {
        flex: 1 1 100%;
        max-width: none;
    }
}

.customers-topbar .datepicker {
    z-index: 60;
    border: 1px solid var(--karvi-200);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.customers-topbar .datepicker-picker {
    background: #fff;
}

.customers-topbar .datepicker-header {
    background: var(--karvi-50);
    border-bottom: 1px solid var(--karvi-200);
}

.customers-topbar .datepicker-controls .button {
    border-radius: 10px;
    color: var(--karvi-800);
}

.customers-topbar .datepicker-controls .button:hover {
    background: var(--karvi-100);
    color: var(--karvi-950);
}

.customers-topbar .datepicker-cell.selected,
.customers-topbar .datepicker-cell.selected:hover {
    background: var(--karvi-black);
    color: #fff;
}

.customers-topbar .datepicker-cell:hover:not(.disabled):not(.selected) {
    background: var(--karvi-100);
}

.admin-modal-dialog-customer {
    width: min(calc(100vw - 2rem), 42rem);
    max-width: 42rem;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.35rem 1rem;
    overflow: hidden;
}

.admin-modal-dialog-customer-services {
    width: min(calc(100vw - 1.5rem), 72rem);
    max-width: 72rem;
    max-height: calc(100dvh - 1.25rem);
    padding: 1.25rem 1.5rem 1.1rem;
}

.customer-services-overview-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.customer-services-overview-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-top: 0.75rem;
}

.customer-services-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.customer-services-summary-card {
    border: 1px solid var(--karvi-200, #e2e8f0);
    border-radius: var(--radius-lg, 0.75rem);
    background: var(--karvi-50, #f8fafc);
    padding: 0.85rem 0.95rem;
    min-width: 0;
}

.customer-services-summary-card-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--karvi-500, #64748b);
}

.customer-services-summary-card-value {
    margin: 0.35rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--karvi-950, #0f172a);
    line-height: 1.25;
}

.customer-services-summary-card-meta {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--karvi-600, #475569);
}

.customer-services-overview-section + .customer-services-overview-section {
    margin-top: 1rem;
}

.customer-services-overview-section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--karvi-950, #0f172a);
}

.customer-services-overview-section-title .material-symbols-rounded {
    font-size: 1.1rem;
    color: var(--karvi-700, #334155);
}

.customer-services-overview-table-wrap {
    overflow: auto;
    border: 1px solid var(--karvi-200, #e2e8f0);
    border-radius: var(--radius-lg, 0.75rem);
    background: #fff;
}

.customer-services-overview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 36rem;
}

.customer-services-overview-table th,
.customer-services-overview-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--karvi-100, #f1f5f9);
    font-size: 0.8125rem;
    vertical-align: top;
}

.customer-services-overview-table th {
    font-weight: 700;
    color: var(--karvi-600, #475569);
    background: var(--karvi-50, #f8fafc);
}

.customer-services-overview-table tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 900px) {
    .customer-services-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-modal-dialog-customer-services {
        width: min(calc(100vw - 1rem), 72rem);
        max-height: calc(100dvh - 0.75rem);
        padding: 1rem;
    }

    .customer-services-summary-cards {
        grid-template-columns: 1fr;
    }
}

.admin-modal-head-customer {
    margin-bottom: 0;
    text-align: left;
    flex-shrink: 0;
}

.admin-modal-head-customer h3 {
    font-size: 1.125rem;
    line-height: 1.25;
}

.customer-modal-sub,
.customer-modal-ref {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.customer-modal-sub {
    color: var(--karvi-500);
}

.customer-modal-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    color: var(--karvi-700);
}

.customer-form-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    margin-top: 0.75rem;
    gap: 0;
}

.customer-form-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.customer-form-sections {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.customer-form-section {
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fff;
}

.customer-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.625rem;
    padding: 0;
    border: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--karvi-600);
}

.customer-form-section-title .material-symbols-rounded {
    font-size: 1rem;
    color: var(--karvi-black);
}

.customer-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

@media (min-width: 640px) {
    .customer-form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.customer-form-span-2 {
    grid-column: 1 / -1;
}

.customer-form-body .form-label {
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
}

.customer-form-body .form-input {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
}

.customer-form-body .admin-modal-upload-error {
    margin-top: 0.75rem;
}

.admin-modal-actions-customer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--karvi-border);
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0.65rem;
}

.customer-form-body .form-section-block {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.customer-form-section-last {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.customer-owners-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.customer-owner-card {
    border: 1px solid #e4e4e7;
    border-radius: 0.85rem;
    background: #fafafa;
    padding: 0.85rem;
}

.customer-owner-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.customer-owner-card-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #18181b;
}

.customer-owner-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.customer-owner-share-input-wrap {
    position: relative;
}

.customer-owner-share-input {
    padding-right: 1.75rem;
}

.customer-owner-share-suffix {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    color: #71717a;
    font-size: 0.8125rem;
    font-weight: 600;
    pointer-events: none;
}

.customer-owner-share-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background: #fff;
    font-size: 0.8125rem;
    color: #52525b;
}

.customer-owner-share-summary strong {
    font-size: 0.875rem;
    color: #18181b;
}

.customer-owner-share-summary.is-valid {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.customer-owner-share-summary.is-valid strong {
    color: #15803d;
}

.customer-owner-share-summary.is-invalid {
    border-color: #fecaca;
    background: #fef2f2;
}

.customer-owner-share-summary.is-invalid strong {
    color: #b91c1c;
}

.customer-profile-owners {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e4e4e7;
}

.customer-profile-sections {
    padding-bottom: 0.25rem;
}

.customer-profile-body .customer-form-scroll {
    max-height: min(70vh, 42rem);
}

.customer-profile-owners-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.customer-profile-section .customer-profile-owners-list {
    margin-top: 0;
}

.customer-profile-section + .customer-profile-section {
    margin-top: 0;
}

.customer-profile-owners-title {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #18181b;
}

.customer-profile-owner-card {
    border: 1px solid #e4e4e7;
    border-radius: 0.85rem;
    background: #fafafa;
    padding: 0.75rem;
    margin-bottom: 0.65rem;
}

.customer-profile-owner-head {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cf-brand-owners-count .form-input {
    max-width: 8rem;
}

.partner-selected-products-wrap {
    padding: 0.75rem;
    border: 1.5px dashed var(--karvi-border);
    border-radius: var(--radius-md);
    background: var(--karvi-50);
}

.partner-selected-products-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.partner-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--karvi-black);
    border-radius: 999px;
    background: var(--karvi-black);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    max-width: 100%;
}

.partner-selected-chip-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: #fff;
    flex-shrink: 0;
}

.partner-selected-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-service-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 18rem;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.customer-service-product-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border: 1.5px solid var(--karvi-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.customer-service-product-item:hover {
    border-color: var(--karvi-300);
    background: var(--karvi-50);
}

.customer-service-product-checkbox {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--karvi-black);
}

.customer-service-product-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.customer-service-product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--karvi-950);
}

.customer-service-product-meta {
    font-size: 0.8125rem;
    color: var(--karvi-500);
    white-space: nowrap;
}

.customer-documents-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1.5rem 0.75rem;
    color: var(--karvi-600);
    font-size: 0.875rem;
}

.customer-documents-loading .material-symbols-rounded {
    animation: spin 1s linear infinite;
}

.admin-modal-dialog-customer-documents {
    width: min(calc(100vw - 1.5rem), 56rem);
    max-width: 56rem;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.35rem 1rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.customer-documents-form {
    min-height: 0;
    flex: 1;
}

.customer-documents-scroll {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.customer-documents-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.customer-documents-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.85rem 0.9rem;
}

.customer-documents-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.customer-documents-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f4f4f5;
    color: var(--karvi-700);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.customer-documents-count-badge.hidden {
    display: none;
}

.customer-documents-empty-state {
    margin: 0;
    padding: 2rem 1rem;
    border: 1px dashed var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fafafa;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--karvi-500);
}

.customer-documents-empty-state.hidden {
    display: none;
}

.customer-documents-table-wrap.data-table-wrap {
    overflow: auto;
}

.customer-documents-table-wrap {
    display: block;
    max-height: min(52vh, 480px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fff;
}

.customer-documents-table {
    min-width: 38rem;
}

.customer-documents-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.7rem 0.85rem;
    font-size: 0.64rem;
    background: #fafafa;
}

.customer-documents-table tbody td {
    padding: 0.72rem 0.85rem;
    font-size: 0.8125rem;
    vertical-align: middle;
    color: var(--karvi-black);
}

.customer-documents-col-name {
    min-width: 11rem;
    max-width: 16rem;
}

.customer-documents-name {
    display: block;
    font-weight: 600;
    color: var(--karvi-black);
    line-height: 1.35;
    word-break: break-word;
}

.customer-documents-file {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--karvi-500);
    word-break: break-word;
}

.customer-documents-col-access {
    min-width: 8.5rem;
}

.customer-documents-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f4f4f5;
    color: var(--karvi-700);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.customer-documents-col-type {
    min-width: 5.5rem;
    text-transform: capitalize;
    color: var(--karvi-700);
}

.customer-documents-col-date {
    min-width: 8.5rem;
    white-space: nowrap;
    color: var(--karvi-600);
    font-size: 0.78rem;
}

.customer-documents-col-actions {
    width: 7.5rem;
    min-width: 7.5rem;
}

.customer-documents-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.customer-documents-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    border: 1.5px solid var(--karvi-border);
    border-radius: 0.65rem;
    background: #fff;
    color: var(--karvi-black);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.customer-documents-icon-btn .material-symbols-rounded {
    font-size: 1.05rem;
}

.customer-documents-icon-btn:hover,
.customer-documents-icon-btn:focus-visible {
    background: #fafafa;
    border-color: #a1a1aa;
    outline: none;
}

.customer-documents-icon-btn-primary {
    background: var(--karvi-black);
    border-color: var(--karvi-black);
    color: #fff;
}

.customer-documents-icon-btn-primary:hover,
.customer-documents-icon-btn-primary:focus-visible {
    background: #27272a;
    border-color: #27272a;
    color: #fff;
}

.customer-documents-icon-btn-danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff;
}

.customer-documents-icon-btn-danger:hover,
.customer-documents-icon-btn-danger:focus-visible {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.customer-documents-icon-btn-danger.is-spinning .material-symbols-rounded {
    animation: dashboard-loading-spin 0.9s linear infinite;
}

.customer-documents-icon-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.admin-modal-actions .btn-primary.is-spinning .material-symbols-rounded,
.admin-modal-actions .btn-secondary.is-spinning .material-symbols-rounded {
    animation: dashboard-loading-spin 0.9s linear infinite;
}

.admin-modal-actions .btn-primary.is-spinning,
.admin-modal-actions .btn-secondary.is-spinning,
.admin-modal-actions .btn-danger.is-spinning {
    opacity: 0.92;
    pointer-events: none;
}

.admin-modal-actions .btn-danger.is-spinning .material-symbols-rounded {
    animation: dashboard-loading-spin 0.9s linear infinite;
}

.customer-document-delete-dialog {
    width: min(calc(100vw - 1.5rem), 24rem);
}

.customer-document-delete-actions {
    margin-top: 0.5rem;
}

.customer-document-delete-dialog .customer-modal-sub {
    margin-top: 0.45rem;
    line-height: 1.45;
}

.customer-doc-upload-form .btn-primary.is-spinning {
    cursor: wait;
}

.admin-modal-dialog-customer-doc-upload {
    width: min(calc(100vw - 1.5rem), 40rem);
    max-width: 40rem;
}

.customer-doc-upload-form .customer-modal-sub {
    margin-top: 0.35rem;
    line-height: 1.45;
}

.customer-doc-upload-access-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .customer-doc-upload-access-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.customer-doc-upload-zone {
    min-height: 7.5rem;
    margin-top: 0;
}

.customer-doc-upload-zone.is-selected {
    border-color: #18181b;
    background: #fff;
    border-style: solid;
}

.customer-doc-upload-zone.is-selected .admin-modal-upload-zone-icon {
    color: #18181b;
}

.customer-doc-upload-zone.is-selected .admin-modal-upload-zone-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-doc-upload-file-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.customer-doc-upload-file-icon {
    flex: 0 0 auto;
    font-size: 1.15rem;
    color: #b91c1c;
}

.customer-doc-upload-file-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    color: #18181b;
    word-break: break-word;
}

.customer-doc-upload-file-size {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: #71717a;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .admin-modal-dialog-customer-documents {
        width: min(calc(100vw - 1rem), 56rem);
        padding: 1rem;
    }

    .customer-documents-table-wrap {
        overflow-x: auto;
    }

    .customer-documents-table {
        min-width: 34rem;
    }
}

.customers-stats .stat-card {
    padding: 1rem 1.1rem;
}

.customers-stats .stat-card .font-display {
    font-size: 1.75rem;
    line-height: 1.1;
}

.customers-stats .stat-card .w-12 {
    width: 2.75rem;
    height: 2.75rem;
}

.customer-profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .customer-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.customer-profile-field {
    margin: 0;
}

.customer-profile-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--karvi-500);
    margin-bottom: 0.25rem;
}

.customer-profile-value {
    font-size: 0.95rem;
    color: var(--karvi-900);
    margin: 0;
    word-break: break-word;
}

.service-details-section + .service-details-section {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.service-details-section-title {
    font-family: var(--font-display, inherit);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--karvi-950);
    margin: 0 0 0.65rem;
}

.admin-modal-dialog-service-commissions {
    width: min(100%, 34rem);
    max-width: min(100%, 34rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1rem 1.15rem 0.9rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

#serviceCommissionsEditModal.admin-modal {
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
}

#serviceCommissionsEditModal .admin-modal-dialog-service-commissions {
    margin-block: auto;
}

.admin-modal-dialog-service-commissions .service-commissions-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    margin-top: 0;
    overflow: hidden;
    gap: 0;
}

.admin-modal-dialog-service-commissions .service-commissions-head {
    flex-shrink: 0;
    text-align: left;
    margin-bottom: 0.65rem;
}

.admin-modal-dialog-service-commissions .service-commissions-head h3 {
    font-size: 1.125rem;
    line-height: 1.3;
}

.admin-modal-dialog-service-commissions .customer-modal-sub {
    margin-top: 0.3rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.admin-modal-dialog-service-commissions .service-commissions-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.1rem 0.35rem 0.65rem 0;
    scrollbar-gutter: stable;
}

.admin-modal-dialog-service-commissions .customer-form-sections {
    gap: 0.7rem;
}

.admin-modal-dialog-service-commissions .customer-form-section {
    padding: 0.7rem 0.75rem;
}

.admin-modal-dialog-service-commissions .customer-form-section-title {
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
}

.admin-modal-dialog-service-commissions .customer-form-grid {
    gap: 0.5rem 0.65rem;
}

.admin-modal-dialog-service-commissions .service-commissions-error {
    flex-shrink: 0;
    margin: 0.35rem 0 0;
}

.admin-modal-dialog-service-commissions .service-commissions-actions {
    flex-shrink: 0;
    margin-top: 0.55rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--karvi-100);
}

@media (max-width: 640px) {
    #serviceCommissionsEditModal.admin-modal {
        padding: 0.65rem;
    }

    .admin-modal-dialog-service-commissions {
        width: min(100%, calc(100vw - 1.25rem));
        max-width: min(100%, calc(100vw - 1.25rem));
        max-height: calc(100dvh - 1.25rem);
        padding: 0.85rem 0.8rem 0.7rem;
        border-radius: 1rem;
    }

    .admin-modal-dialog-service-commissions .service-commissions-scroll {
        padding-right: 0.15rem;
    }
}

.admin-modal-dialog-service-details {
    width: min(100%, 52rem);
    max-width: min(100%, 52rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 1.15rem;
    padding-bottom: 0.9rem;
}

.admin-modal-dialog-service-details .admin-modal-head {
    flex-shrink: 0;
    text-align: left;
    margin-bottom: 0.75rem;
}

.admin-modal-dialog-service-details .admin-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.15rem 0.15rem 0.75rem;
    scrollbar-gutter: stable;
}

.admin-modal-dialog-service-details .admin-modal-actions {
    flex-shrink: 0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--karvi-100);
}

@media (max-width: 640px) {
    .admin-modal-dialog-service-details {
        width: min(100%, calc(100vw - 1.25rem));
        max-width: min(100%, calc(100vw - 1.25rem));
        max-height: calc(100dvh - 1.25rem);
    }
}

.service-details-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.service-details-layout-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

@media (max-width: 900px) {
    .service-details-layout:not(.service-details-layout-list) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .service-details-layout:not(.service-details-layout-list) {
        grid-template-columns: 1fr;
    }
}

.service-details-card {
    border: 1px solid var(--karvi-100);
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--karvi-50) 100%);
    padding: 0.85rem 0.9rem;
    min-height: 100%;
}

.service-details-card .customer-profile-grid {
    gap: 0.55rem 0.75rem;
}

.service-details-card .customer-profile-label {
    font-size: 0.68rem;
    margin-bottom: 0.15rem;
}

.service-details-card .customer-profile-value {
    font-size: 0.82rem;
    line-height: 1.35;
}

.service-details-section-list {
    border: 1px solid var(--karvi-100);
    border-radius: 0.85rem;
    background: #fff;
    padding: 0.85rem 1rem;
}

.service-details-section-list .service-details-section-title {
    margin-bottom: 0.55rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--karvi-100);
}

.service-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.service-details-row {
    display: grid;
    grid-template-columns: minmax(16rem, 44%) auto minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    align-items: baseline;
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 0.22rem 0;
}

.service-details-row-label {
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-details-row-sep {
    color: #cbd5e1;
    font-weight: 500;
}

.service-details-row-value {
    color: var(--karvi-950);
    font-weight: 600;
    word-break: break-word;
}

@media (max-width: 640px) {
    .service-details-row {
        grid-template-columns: minmax(9.5rem, 40%) auto minmax(0, 1fr);
        font-size: 0.8125rem;
        gap: 0.3rem 0.4rem;
    }

    .service-details-row-label {
        white-space: normal;
    }
}

@media (max-width: 520px) {
    .service-details-row {
        grid-template-columns: minmax(8.5rem, 42%) auto minmax(0, 1fr);
    }
}

.admin-modal-dialog-contract-details {
    width: min(560px, calc(100vw - 2rem));
    max-width: none;
}

.admin-modal-dialog-contract-details .admin-modal-head {
    padding-bottom: 0.85rem;
}

.contract-details-body {
    padding-top: 0.15rem;
    padding-bottom: 0.35rem;
}

.contract-details-layout {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.contract-details-section {
    border: 1px solid var(--karvi-100);
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}

.contract-details-section-title {
    margin: 0;
    padding: 0.5rem 0.8rem;
    font-family: var(--font-display, inherit);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--karvi-700);
    background: linear-gradient(180deg, var(--karvi-50) 0%, #fff 100%);
    border-bottom: 1px solid var(--karvi-100);
}

.contract-details-list {
    margin: 0;
    padding: 0.2rem 0;
    list-style: none;
}

.contract-details-row {
    display: block;
    margin: 0;
    padding: 0.28rem 0.8rem;
    border-top: 0;
    text-align: left;
}

.contract-details-row + .contract-details-row {
    border-top: 1px solid var(--karvi-50);
}

.contract-details-label {
    display: inline;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--karvi-600);
}

.contract-details-label::after {
    content: ':';
    margin-right: 0.35rem;
}

.contract-details-value {
    display: inline;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--karvi-950);
    word-break: break-word;
    text-align: left;
}

.contract-details-value .status-badge {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 0.15rem;
}

.contract-details-empty {
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--karvi-500);
}

@media (max-width: 480px) {
    .contract-details-row {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }
}

.admin-modal-body-scroll {
    max-height: min(70vh, 640px);
    overflow-y: auto;
}

.services-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 120;
    max-width: min(92vw, 420px);
    padding: 0.75rem 1rem;
    border-radius: 0.875rem;
    background: var(--karvi-950);
    color: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.services-toast.hidden {
    display: none;
}

.contract-actions-item-disabled {
    opacity: 0.72;
}

.contract-actions-item.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.contract-actions-item.is-loading .contract-actions-item-type-icon,
.contract-actions-item.is-loading:not(.contract-actions-item-download) .contract-actions-item-icon .material-symbols-rounded {
    animation: dashboard-loading-spin 0.9s linear infinite;
}

.contract-actions-item-icon-duo {
    width: auto;
    min-width: 2rem;
    gap: 0.1rem;
    padding: 0 0.3rem;
}

.contract-actions-item-download-icon {
    font-size: 0.95rem;
    color: var(--karvi-700);
}

.contract-actions-dual {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}

.contract-actions-dual .contract-actions-item-download {
    flex: 1;
    min-width: 0;
}

.contract-actions-item-view,
.contract-actions-item-upload {
    flex: 0 0 auto;
    width: 2.75rem;
    min-width: 2.75rem;
    padding: 0.55rem;
    justify-content: center;
}

.contract-actions-dual-disabled {
    opacity: 0.72;
}

body.document-preview-open {
    overflow: hidden;
}

.document-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
}

.document-preview-overlay.hidden {
    display: none;
}

.document-preview-dialog {
    display: flex;
    flex-direction: column;
    width: min(100%, 72rem);
    height: min(100%, 92vh);
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.document-preview-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--karvi-border);
    background: #fff;
}

.document-preview-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--karvi-950);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--karvi-border);
    border-radius: 0.7rem;
    background: #fff;
    color: var(--karvi-950);
    cursor: pointer;
}

.document-preview-close:hover,
.document-preview-close:focus-visible {
    background: #fafafa;
    outline: none;
}

.document-preview-status {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: var(--karvi-700);
    font-size: 0.875rem;
    text-align: center;
}

.document-preview-status.hidden {
    display: none;
}

.document-preview-status-error {
    color: #b91c1c;
}

.document-preview-host {
    flex: 1;
    min-height: 0;
    background: #525659;
}

.document-preview-host.hidden {
    display: none;
}

.document-preview-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #525659;
}

.document-preview-image-wrap {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
}

.document-preview-image {
    display: block;
    max-width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.qr-code-preview-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--karvi-200);
    background: linear-gradient(180deg, #ffffff 0%, var(--karvi-50) 100%);
}

.qr-code-preview-canvas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.qr-code-preview-canvas canvas,
.qr-code-preview-canvas img {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-code-preview-empty .empty-state-icon {
    background: var(--karvi-100);
}

.qr-code-hidden-host {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.qr-code-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.qr-code-preset-btn {
    border: 1px solid var(--karvi-200);
    background: #fff;
    color: var(--karvi-700);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.qr-code-preset-btn:hover {
    border-color: var(--karvi-black);
    color: var(--karvi-950);
}

.qr-code-color-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.qr-code-color-input {
    width: 3rem;
    height: 2.75rem;
    padding: 0.2rem;
    border: 1px solid var(--karvi-200);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
}

.qr-code-color-hex {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-transform: lowercase;
}

.qr-code-range {
    width: 100%;
    accent-color: var(--karvi-black);
}

.qr-code-logo-panel {
    padding-top: 0.25rem;
    border-top: 1px solid var(--karvi-100);
}

.qr-code-logo-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--karvi-200);
    background: var(--karvi-50);
}

.qr-code-logo-preview-img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.25rem;
}

.reg-api-debug-close {
    width: 100%;
}

.page-admin-map main {
    max-width: none;
}

.map-page-shell {
    min-height: 34rem;
    height: calc(100vh - 9.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--karvi-border);
    background: #fff;
}

.map-category-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fafafa;
    color: var(--karvi-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-category-tab:hover {
    color: var(--karvi-black);
    border-color: #d4d4d8;
}

.map-category-tab.active {
    background: var(--karvi-black);
    border-color: var(--karvi-black);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.map-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.75rem;
    font-weight: 700;
}

.map-category-tab.active .map-category-count {
    background: rgba(255, 255, 255, 0.18);
}

.map-page-loading,
.map-page-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 24rem;
    padding: 2rem;
    text-align: center;
    color: var(--karvi-muted);
}

.map-page-loading .material-symbols-rounded,
.map-page-error .material-symbols-rounded {
    font-size: 2.5rem;
    color: var(--karvi-black);
}

.map-page-content {
    display: grid;
    grid-template-columns: minmax(16rem, 30%) minmax(0, 70%);
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.map-customer-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--karvi-border);
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.map-customer-panel-head {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--karvi-border);
}

.map-customer-panel-head h3 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--karvi-black);
}

.map-customer-panel-meta {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--karvi-muted);
}

.map-panel-progress {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--karvi-black);
}

.map-customer-item.is-appearing {
    animation: map-item-in 0.28s ease-out;
}

@keyframes map-item-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-panel-filters {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.map-panel-search {
    position: relative;
    display: block;
}

.map-panel-search .material-symbols-rounded {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--karvi-muted);
    pointer-events: none;
}

.map-panel-input {
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--karvi-black);
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
}

.map-panel-search .map-panel-input {
    padding-left: 2.25rem;
}

.map-distance-box {
    display: grid;
    gap: 0.35rem;
}

.map-distance-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--karvi-muted);
}

.map-distance-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.4rem;
    align-items: center;
}

.map-distance-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 0.7rem;
    border: 1px solid var(--karvi-border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--karvi-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.map-distance-btn .material-symbols-rounded {
    font-size: 1.05rem;
}

.map-distance-btn:hover,
.map-distance-btn:focus-visible {
    color: var(--karvi-black);
    border-color: #d4d4d8;
    outline: none;
}

.map-distance-btn-primary {
    background: var(--karvi-black);
    border-color: var(--karvi-black);
    color: #fff;
}

.map-distance-btn-primary:hover,
.map-distance-btn-primary:focus-visible {
    color: #fff;
    opacity: 0.92;
}

.map-distance-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.map-distance-status {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--karvi-muted);
}

.map-distance-status.is-error {
    color: #b91c1c;
}

.map-customer-distance {
    display: inline-flex;
    margin-top: 0.35rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #f4f4f5;
    color: var(--karvi-black);
    font-size: 0.72rem;
    font-weight: 700;
}

.map-panel-select {
    cursor: pointer;
}

.map-product-radios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.map-product-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: auto;
    max-width: 100%;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--karvi-border);
    border-radius: 999px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 0 0 auto;
}

.map-product-radio:hover {
    border-color: #d4d4d8;
    background: #f4f4f5;
}

.map-product-radio.is-active {
    border-color: var(--karvi-black);
    background: #111827;
    color: #fff;
}

.map-product-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.map-product-radio-mark {
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    border: 2px solid #a1a1aa;
    flex-shrink: 0;
    position: relative;
    background: #fff;
}

.map-product-radio.is-active .map-product-radio-mark {
    border-color: #fff;
}

.map-product-radio.is-active .map-product-radio-mark::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 999px;
    background: #fff;
}

.map-product-radio-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.map-customer-list {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    padding: 0.5rem;
}

.map-customer-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.8rem 0.85rem;
    margin-bottom: 0.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.map-customer-item:hover,
.map-customer-item.active {
    background: #f4f4f5;
    border-color: #e4e4e7;
}

.map-customer-item.active {
    box-shadow: inset 3px 0 0 var(--karvi-black);
}

.map-customer-item.is-muted {
    opacity: 0.72;
}

.map-customer-item-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
}

.map-service-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    background: var(--karvi-black);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.map-customer-name {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--karvi-black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-customer-status {
    flex-shrink: 0;
    max-width: 42%;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--karvi-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-customer-subtitle,
.map-customer-location {
    font-size: 0.75rem;
    color: var(--karvi-muted);
    line-height: 1.4;
}

.map-customer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--karvi-muted);
}

.map-customer-empty .material-symbols-rounded {
    font-size: 2rem;
}

.map-canvas-wrap {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #eef2f6;
}

.map-canvas {
    width: 100%;
    height: 100%;
    min-height: 0;
    z-index: 1;
}

.map-service-marker {
    background: transparent;
    border: 0;
}

.map-service-marker-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.map-canvas-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--karvi-muted);
    background: rgba(238, 242, 246, 0.82);
    pointer-events: none;
}

.map-canvas-empty .material-symbols-rounded {
    font-size: 2rem;
}

.map-popup {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--karvi-black);
}

.map-popup-meta,
.map-popup-address {
    margin-top: 0.35rem;
    color: var(--karvi-muted);
}

@media (max-width: 1024px) {
    .map-page-shell {
        height: calc(100vh - 8.5rem);
    }

    .map-page-content {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(16rem, 40%) minmax(0, 1fr);
        height: 100%;
    }

    .map-customer-panel {
        border-right: none;
        border-bottom: 1px solid var(--karvi-border);
        max-height: none;
    }

    .map-canvas,
    .map-canvas-wrap {
        min-height: 0;
        height: 100%;
    }
}

.map-coming-soon-card {
    min-height: 24rem;
}

.map-coming-soon-icon {
    opacity: 0.65;
}

.map-coming-soon-badge {
    display: inline-flex;
    margin-top: 1.25rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: #f4f4f5;
    border: 1px solid var(--karvi-border);
    color: var(--karvi-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-modal-dialog-service-delivery {
    width: min(calc(100vw - 2rem), 68rem);
    max-width: 68rem;
}

.service-delivery-modal-actions {
    justify-content: space-between;
    align-items: center;
}

.service-delivery-save-success {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #15803d;
}

.service-delivery-save-success.hidden {
    display: none;
}

.service-delivery-modal-actions-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.service-delivery-head {
    padding-bottom: 0;
}

.service-delivery-head-menu {
    display: flex;
    align-items: stretch;
    gap: 0.3rem;
    margin-top: 0.85rem;
    padding: 0.3rem;
    border: 1px solid var(--karvi-border);
    border-radius: 0.75rem;
    background: #ececee;
}

.service-delivery-head-menu .service-delivery-tab {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid transparent;
    background: transparent;
    color: #52525b;
    border-radius: 0.55rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
}

.service-delivery-head-menu .service-delivery-tab:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--karvi-black);
}

.service-delivery-head-menu .service-delivery-tab.is-active {
    background: var(--karvi-black);
    border-color: var(--karvi-black);
    color: var(--karvi-white);
    box-shadow: 0 4px 12px rgba(10, 10, 10, 0.22);
}

.service-delivery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.service-delivery-tab {
    border: none;
    background: transparent;
    color: #52525b;
    border-radius: 0.65rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
    line-height: 1.2;
}

.service-delivery-tab:hover {
    background: rgba(255, 255, 255, 0.72);
    color: var(--karvi-black);
}

.service-delivery-tab.is-active {
    background: var(--karvi-black);
    color: var(--karvi-white);
    box-shadow: 0 4px 12px rgba(10, 10, 10, 0.22);
}

.service-delivery-business-form {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.15rem;
}

.service-delivery-business-block {
    display: grid;
    gap: 0.45rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #ececee;
}

.service-delivery-business-block:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.service-delivery-business-block .form-label {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--karvi-black);
}

.service-delivery-business-input {
    max-width: 100%;
}

.service-delivery-business-hint {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--karvi-muted);
}

.service-delivery-chip-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.service-delivery-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--karvi-border);
    border-radius: 999px;
    background: #fff;
    color: var(--karvi-black);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    width: auto;
    flex: 0 0 auto;
}

.service-delivery-chip:hover {
    border-color: var(--karvi-black);
}

.service-delivery-chip:has(input:checked) {
    background: var(--karvi-black);
    border-color: var(--karvi-black);
    color: var(--karvi-white);
}

.service-delivery-chip input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.service-delivery-business-inline-field {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.service-delivery-business-inline-field.hidden {
    display: none;
}

.service-delivery-business-textarea {
    min-height: 4.5rem;
    resize: vertical;
}

.service-delivery-business-rating-row {
    display: grid;
    grid-template-columns: minmax(8rem, 11rem) minmax(6rem, 9rem);
    gap: 0.65rem;
    align-items: end;
}

.service-delivery-business-rating-field {
    display: grid;
    gap: 0.3rem;
}

.service-delivery-business-sub-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--karvi-muted);
}

.service-delivery-business-fieldset {
    border: 1px solid var(--karvi-border);
    border-radius: 0.85rem;
    padding: 0.95rem 1rem 1rem;
    margin: 0;
    background: #fff;
}

.service-delivery-business-fieldset .form-label {
    margin-bottom: 0.65rem;
}

.service-delivery-business-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.service-delivery-business-note {
    margin-top: 0.85rem;
}

.service-delivery-business-note.hidden {
    display: none;
}

.customer-form-field-span-2 {
    grid-column: 1 / -1;
}

.service-documents-empty {
    margin: 0;
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
    color: var(--karvi-muted);
}

@media (max-width: 768px) {
    .service-delivery-head-menu {
        flex-wrap: wrap;
    }

    .service-delivery-head-menu .service-delivery-tab {
        flex: 1 1 calc(50% - 0.3rem);
        white-space: normal;
    }

    .service-delivery-business-rating-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .service-delivery-head-menu .service-delivery-tab {
        flex: 1 1 100%;
    }

    .service-delivery-business-rating-row {
        grid-template-columns: 1fr;
    }
}

.service-delivery-panel {
    display: none;
}

.service-delivery-panel.is-active {
    display: block;
}

.service-delivery-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin: 0 0 0.75rem;
}

.service-delivery-panel-note {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--karvi-500);
    max-width: 36rem;
}

.service-delivery-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--karvi-border);
    background: #fff;
    color: var(--karvi-900);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.service-delivery-add-btn:hover {
    background: #fafafa;
    border-color: #d4d4d8;
}

.service-delivery-add-btn .material-symbols-rounded {
    font-size: 1.125rem;
    color: #15803d;
}

.service-delivery-sheet {
    border: 1px solid var(--karvi-border);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.service-delivery-table-wrap {
    overflow-x: auto;
}

.service-delivery-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.8125rem;
}

.service-delivery-postal-table th:nth-child(1) { width: 30%; }
.service-delivery-postal-table th:nth-child(2) { width: 18%; }
.service-delivery-postal-table th:nth-child(3) { width: 18%; }
.service-delivery-postal-table th:nth-child(4) { width: 24%; }

.service-delivery-table th,
.service-delivery-table td {
    border-bottom: 1px solid var(--karvi-border);
    padding: 0.55rem 0.65rem;
    vertical-align: middle;
    text-align: left;
}

.service-delivery-table thead th {
    background: #f4f4f5;
    font-weight: 700;
    color: var(--karvi-900);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.service-delivery-table tbody tr:last-child td {
    border-bottom: 0;
}

.service-delivery-table tbody tr:hover td {
    background: #fafafa;
}

.service-delivery-row-new td {
    background: #fffbeb;
}

.service-delivery-empty-row td {
    color: var(--karvi-500);
    font-style: italic;
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: #fafafa;
}

.service-delivery-cell-input {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    font-size: 0.8125rem;
    border-radius: 0.55rem;
    border: 1px solid #e4e4e7;
    background: #fff;
}

.service-delivery-cell-input:focus {
    outline: none;
    border-color: var(--karvi-700);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.service-delivery-time-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
}

.service-delivery-day-cell {
    width: 8.5rem;
    font-weight: 600;
    color: var(--karvi-900);
    background: #fcfcfc;
}

.service-delivery-actions-col {
    width: 3.25rem;
}

.service-delivery-actions-cell {
    text-align: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.service-delivery-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e4e4e7;
    border-radius: 0.65rem;
    background: #fff;
    color: var(--karvi-700);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.service-delivery-icon-btn .material-symbols-rounded {
    font-size: 1.05rem;
}

.service-delivery-icon-btn:hover {
    background: #fafafa;
    border-color: #d4d4d8;
}

.service-delivery-icon-btn-danger {
    color: #b42318;
}

.service-delivery-icon-btn-danger:hover {
    background: #fef3f2;
    border-color: #fecdca;
}

.service-lieferando-required-list {
    list-style: disc;
    padding-left: 1.25rem;
    color: var(--karvi-800, #1e293b);
    font-size: 0.875rem;
    line-height: 1.5;
}

.service-lieferando-required-list li + li {
    margin-top: 0.35rem;
}

.service-document-view-field {
    border: 0;
    margin: 0;
    padding: 0;
}

.service-document-view-field .form-label,
.service-document-view-field legend.form-label {
    margin-bottom: 0.65rem;
}

.service-document-view-options {
    flex-direction: column;
    align-items: stretch;
}

.service-document-view-option {
    width: 100%;
}

@media (max-width: 640px) {
    .service-delivery-panel-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .service-delivery-add-btn {
        justify-content: center;
    }
}

.sidebar-sync-progress {
    flex-shrink: 0;
    margin: 0 1rem 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-sync-progress.hidden,
.sidebar-sync-progress[hidden] {
    display: none;
}

.sidebar-sync-progress-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #e4e4e7;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.sidebar-sync-progress-icon {
    font-size: 1rem;
    color: #a1a1aa;
}

.sidebar-sync-progress-track {
    margin-top: 0.55rem;
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.sidebar-sync-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: #ffffff;
    transition: width 0.35s ease;
}

.sidebar-sync-progress-meta {
    margin-top: 0.4rem;
    font-size: 0.68rem;
    color: #a1a1aa;
    min-height: 1em;
}

.rechungs-status-dialog {
    width: min(calc(100vw - 2rem), 40rem);
    max-width: 40rem;
    padding: 1.75rem 1.75rem 1.5rem;
}

.rechungs-status-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 0.75rem;
}

.rechungs-status-head-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    background: #0a0a0a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rechungs-status-ref {
    margin-top: 0.2rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: #52525b;
}

.rechungs-status-hint {
    margin: 0 0 1.15rem;
    color: #71717a;
    font-size: 0.9rem;
    line-height: 1.45;
}

.rechungs-status-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.rechungs-status-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 5.25rem;
    padding: 0.85rem 0.5rem;
    border-radius: 1rem;
    border: 1px solid #e4e4e7;
    background: #fafafa;
    color: #18181b;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.rechungs-status-choice .material-symbols-rounded {
    font-size: 1.45rem;
}

.rechungs-status-choice:hover {
    border-color: #a1a1aa;
    background: #fff;
}

.rechungs-status-choice.is-selected {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}

.rechungs-status-panel,
.rechungs-status-note {
    margin-top: 1rem;
}

.rechungs-status-panel {
    padding: 0.9rem 1rem 1rem;
    border-radius: 1rem;
    background: #fafafa;
    border: 1px solid #e4e4e7;
}

.rechungs-status-note textarea {
    min-height: 7.5rem;
    resize: vertical;
}

.rechungs-status-error {
    margin-top: 0.85rem;
    font-size: 0.875rem;
    color: #b91c1c;
}

.rechungs-status-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

@media (max-width: 640px) {
    .rechungs-status-dialog {
        padding: 1.25rem 1rem 1rem;
    }

    .rechungs-status-choices {
        grid-template-columns: 1fr;
    }

    .rechungs-status-choice {
        flex-direction: row;
        justify-content: flex-start;
        min-height: 3.25rem;
        padding: 0.75rem 1rem;
    }

    .rechungs-status-actions {
        flex-direction: column-reverse;
    }

    .rechungs-status-actions .btn-primary,
    .rechungs-status-actions .btn-secondary {
        width: 100%;
    }
}

.rechungs-invoice-wrap.data-table-wrap {
    overflow-x: auto;
}

.rechungs-invoice-table {
    table-layout: fixed;
    width: 100%;
    min-width: 76rem;
}

.rechungs-invoice-table.is-all {
    min-width: 88rem;
}

.rechungs-invoice-table th,
.rechungs-invoice-table td {
    padding: 0.75rem 0.65rem;
    overflow-wrap: anywhere;
}

.rechungs-invoice-table .rechungs-col-number { width: 9%; }
.rechungs-invoice-table .rechungs-col-customer { width: 28%; }
.rechungs-invoice-table .rechungs-col-contact { width: 13%; }
.rechungs-invoice-table .rechungs-col-dates { width: 14%; }
.rechungs-invoice-table .rechungs-col-gross { width: 10%; }
.rechungs-invoice-table .rechungs-col-status { width: 12%; }
.rechungs-invoice-table .rechungs-col-actions { width: 14%; }

.rechungs-invoice-table.is-all .rechungs-col-number { width: 8%; }
.rechungs-invoice-table.is-all .rechungs-col-customer { width: 20%; }
.rechungs-invoice-table.is-all .rechungs-col-for { width: 13%; }
.rechungs-invoice-table.is-all .rechungs-col-contact { width: 12%; }
.rechungs-invoice-table.is-all .rechungs-col-dates { width: 13%; }
.rechungs-invoice-table.is-all .rechungs-col-gross { width: 8%; }
.rechungs-invoice-table.is-all .rechungs-col-status { width: 11%; }
.rechungs-invoice-table.is-all .rechungs-col-actions { width: 15%; }

.rechungs-invoice-table .rechungs-col-number,
.rechungs-invoice-table td:first-child {
    white-space: nowrap;
}

.rechungs-invoice-table .rechungs-dates,
.rechungs-invoice-table .rechungs-money,
.rechungs-invoice-table .rechungs-status {
    white-space: nowrap;
}

.rechungs-invoice-table tbody tr[data-status="pending"] {
    background: #ffffff;
}

.rechungs-invoice-table tbody tr[data-status="paid"] {
    background: #dcfce7;
}

.rechungs-invoice-table tbody tr[data-status="cancelled"] {
    background: #fee2e2;
}

.rechungs-invoice-table tbody tr[data-status="pending"]:hover {
    background: #fafafa;
}

.rechungs-invoice-table tbody tr[data-status="paid"]:hover {
    background: #bbf7d0;
}

.rechungs-invoice-table tbody tr[data-status="cancelled"]:hover {
    background: #fecaca;
}

.rechungs-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: auto;
}

.rechungs-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    flex: 0 0 auto;
    border-radius: 0.7rem;
    border: 1px solid #e4e4e7;
    background: #fff;
    color: #18181b;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.rechungs-row-action .material-symbols-rounded {
    font-size: 1.15rem;
}

.rechungs-action-tip {
    position: fixed;
    z-index: 80;
    transform: translate(-50%, calc(-100% - 0.4rem));
    padding: 0.28rem 0.5rem;
    border-radius: 0.4rem;
    background: #18181b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(24, 24, 27, 0.18);
}

.rechungs-row-action:hover {
    background: #fafafa;
    border-color: #a1a1aa;
}

.rechungs-row-action.hidden {
    display: none;
}

.rechungs-row-action.is-danger {
    color: #b91c1c;
    border-color: #fecaca;
}

.rechungs-row-action.is-danger:hover {
    background: #fef2f2;
}

.am-invoice-dialog {
    width: min(calc(100vw - 2rem), 78rem);
    max-width: 78rem;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem 1.1rem;
    overflow: hidden;
}

.am-invoice-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.am-invoice-actions {
    justify-content: flex-end;
}

.am-invoice-status {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #52525b;
}

.am-invoice-status-error {
    color: #b91c1c;
}

.am-invoice-list {
    margin-top: 0.85rem;
    flex: 1;
    min-height: 0;
    max-height: min(34rem, 58vh);
    overflow: auto;
    border: 1px solid #e4e4e7;
    border-radius: 0.85rem;
}

.am-invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.am-invoice-table th,
.am-invoice-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid #f4f4f5;
    vertical-align: middle;
}

.am-invoice-table th {
    position: sticky;
    top: 0;
    background: #fafafa;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #71717a;
}

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

.am-invoice-table tbody tr:hover {
    background: #fafafa;
}

.am-invoice-check {
    width: 2.5rem;
}

.am-invoice-check input {
    width: 1rem;
    height: 1rem;
    accent-color: #18181b;
}

.list-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.list-pager[hidden] {
    display: none;
}

.list-pager-status {
    min-width: 7.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    color: #52525b;
}

.list-pager-btn {
    min-width: 2.5rem;
    padding: 0.4rem 0.75rem !important;
}

/* Website create — Company & contact structured blocks */
.website-company-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.website-company-block {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--karvi-border, #e4e4e7);
    border-radius: 0.9rem;
    background: #fafafa;
}

.website-company-block-label {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--karvi-600, #52525b);
}

.website-company-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .website-company-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .website-company-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.website-company-span-2 {
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .website-company-span-2 {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .website-company-span-2 {
        grid-column: span 2;
    }
}

.website-company-block .form-label {
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
}

.website-company-block .form-input {
    background: #fff;
}

.website-company-block .owner-name-field {
    min-width: 0;
}

.join-board {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: -1.15rem;
}

.join-bar,
.join-record,
.join-empty,
.join-error {
    background: #fff;
    border: 1px solid var(--karvi-border);
    border-radius: 10px;
}

.join-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    overflow-x: auto;
}

.join-status-counts {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
}

.join-count-card {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 32px;
    padding: 0 0.65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.join-count-card strong {
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.join-count-card.is-draft { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.join-count-card.is-new,
.join-count-card.is-pending { color: #1e3a8a; background: #eff6ff; border-color: #bfdbfe; }
.join-count-card.is-signed { color: #14532d; background: #f0fdf4; border-color: #bbf7d0; }
.join-count-card.is-reviewed { color: #3f3f46; background: #f4f4f5; border-color: #e4e4e7; }
.join-count-card.is-live { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; }

.join-filters {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
}

.join-input {
    box-sizing: border-box;
    height: 32px;
    min-width: 0;
    padding: 0 0.6rem;
    border: 1px solid #e4e4e7;
    border-radius: 7px;
    background: #fafafa;
    color: #18181b;
    font-size: 0.8125rem;
    line-height: 30px;
}

.join-input:focus {
    outline: none;
    border-color: #18181b;
    background: #fff;
}

.join-search { flex: 1 1 auto; width: 1%; min-width: 8rem; }
.join-status { flex: 0 0 8.5rem; width: 8.5rem; }

.join-date-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    width: auto;
    min-width: 6.5rem;
    padding: 0 0.7rem;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.join-date-btn .material-symbols-rounded {
    font-size: 18px;
    color: #71717a;
}

.join-date-btn.is-set {
    border-color: #18181b;
    background: #18181b;
    color: #fff;
}

.join-date-btn.is-set .material-symbols-rounded {
    color: #fff;
}

.join-date-dialog {
    width: min(360px, calc(100vw - 2rem));
}

.join-cal-summary {
    margin: 0 0 0.85rem;
    color: #18181b;
    font-size: 0.875rem;
    font-weight: 700;
}

.join-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.join-cal-nav strong {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.join-cal-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background: #fff;
    color: #18181b;
    cursor: pointer;
}

.join-cal-arrow:hover {
    border-color: #e23744;
    color: #e23744;
}

.join-cal-week,
.join-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.join-cal-week span {
    height: 28px;
    color: #a1a1aa;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.join-cal-day {
    position: relative;
    height: 38px;
    border: 0;
    background: transparent;
    color: #18181b;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.join-cal-day.is-muted {
    color: #d4d4d8;
}

.join-cal-day.is-today {
    box-shadow: inset 0 0 0 1px #e23744;
    border-radius: 999px;
}

.join-cal-day.is-range {
    background: #fee2e2;
    border-radius: 0;
}

.join-cal-day.is-start,
.join-cal-day.is-end {
    background: #e23744;
    color: #fff;
    border-radius: 999px;
    z-index: 1;
}

.join-cal-day.is-start.is-range,
.join-cal-day.is-end.is-range,
.join-cal-day.is-start:not(.is-end),
.join-cal-day.is-end:not(.is-start) {
    box-shadow: none;
}

.join-cal-day.is-span.is-start:not(.is-end)::before,
.join-cal-day.is-span.is-end:not(.is-start)::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: #fee2e2;
    z-index: -1;
}

.join-cal-day.is-span.is-start:not(.is-end)::before { right: 0; }
.join-cal-day.is-span.is-end:not(.is-start)::before { left: 0; }

.join-cal-day:hover:not(.is-start):not(.is-end) {
    background: #fff1f2;
    border-radius: 999px;
}

.join-date-clear {
    height: 34px;
    margin-top: 0.9rem;
    padding: 0 0.8rem;
}

.join-error.hidden,
.join-empty.hidden,
.join-filters .hidden {
    display: none !important;
}

.join-error.settings-inline-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
}

.join-form-title {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.join-sort {
    flex: 0 0 11.5rem;
    width: 11.5rem;
}

.join-tag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 0.65rem;
    border-radius: 8px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.join-tag.is-partner { background: #1d4ed8; }
.join-tag.is-pos { background: #b45309; }
.join-tag.is-website { background: #15803d; }
.join-tag.is-neutral { background: #3f3f46; }

.data-table.join-table .settings-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

.data-table.join-table .settings-row-btn {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    padding: 0 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.join-empty h3,
.join-empty p {
    margin: 0;
}

.join-empty p {
    margin-top: 0.2rem;
    color: #71717a;
    font-size: 0.8125rem;
}

.pdf-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pdf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.pdf-panel {
    background: #fff;
    border: 1px solid var(--karvi-border);
    border-radius: 10px;
    padding: 0.85rem 0.9rem;
}

.pdf-panel-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}

.pdf-panel-head p {
    margin: 0.2rem 0 0.75rem;
    color: #71717a;
    font-size: 0.75rem;
}

.pdf-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #71717a;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pdf-text,
.pdf-file {
    width: 100%;
    height: auto;
    background: #fff;
}

.pdf-text {
    min-height: 132px;
    padding: 0.6rem 0.7rem;
    line-height: 1.45;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pdf-file {
    padding: 0.35rem 0.55rem;
    line-height: 1.4;
}

body:has(.contract-designer) {
    height: 100vh;
    overflow: hidden;
}

body:has(.contract-designer) .admin-shell {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body:has(.contract-designer) .admin-shell > .flex-1 {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body:has(.contract-designer) .admin-shell main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.contract-designer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.contract-designer > .join-error {
    flex: 0 0 auto;
}

.contract-designer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
    gap: 0.85rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.contract-designer-preview-pane {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem;
    border: 1px dashed #d4d4d8;
    border-radius: 12px;
    background: linear-gradient(180deg, #f4f4f5 0%, #e4e4e7 100%);
}

.contract-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    padding: 0 0.15rem;
    color: #52525b;
    font-size: 0.75rem;
}

.contract-preview-meta strong {
    color: #18181b;
}

.contract-preview-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
}

.a4-page {
    --cd-font: "DejaVu Sans", Arial, Helvetica, sans-serif;
    --cd-body-size: 10px;
    --cd-heading-size: 10px;
    --cd-subheading-size: 10px;
    --cd-title-size: 19px;
    --cd-header-size: 12px;
    --cd-footer-size: 10px;
    width: 794px;
    height: 1123px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #111;
    font-family: var(--cd-font);
    font-size: var(--cd-body-size);
    line-height: 1.45;
    box-shadow: 0 10px 30px rgba(24, 24, 27, 0.12);
    border: 1px solid #d4d4d8;
    padding: 36px 48px 28px 56px;
    position: relative;
    overflow: hidden;
}

.a4-page,
.a4-page * {
    font-family: var(--cd-font) !important;
}

.a4-watermark {
    position: absolute;
    left: -18px;
    top: 52%;
    width: 18px;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    font-size: 7.5px;
    letter-spacing: 0.04em;
    color: #9ca3af;
    pointer-events: none;
    user-select: none;
}

.a4-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #000;
    color: #fff;
    margin: -36px -48px 14px -56px;
    padding: 18px 48px 18px 56px;
    min-height: 96px;
    font-size: var(--cd-header-size);
    font-weight: 400;
    line-height: 1.45;
    outline: none;
    position: relative;
    z-index: 1;
}

.a4-header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.a4-header-logo img {
    height: 64px;
    max-width: 240px;
    width: auto;
    object-fit: contain;
}

.a4-header-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    color: #fff;
    outline: none;
    font-weight: 400;
}

.a4-header-text,
.a4-header-text * {
    color: #fff !important;
    text-align: right !important;
    font-weight: 400;
}

.a4-header-text strong,
.a4-header-text b {
    font-weight: 700 !important;
}

.a4-header-text p {
    margin: 0;
}

.a4-header.is-active .a4-header-text {
    box-shadow: inset 0 0 0 1.5px #e23744;
    background: rgba(226, 55, 68, 0.12);
}

.a4-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.a4-footer {
    flex: 0 0 auto;
    background: #e5e7eb;
    color: #111;
    border-top: 3px solid #e23744;
    margin: 10px -48px -28px -56px;
    padding: 14px 48px 44px 56px;
    font-size: var(--cd-footer-size);
    line-height: 1.55;
    outline: none;
    position: relative;
    z-index: 1;
}

.a4-footer,
.a4-footer * {
    color: #111 !important;
}

.a4-footer p {
    margin: 0;
}

.a4-footer .cd-footer-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.a4-footer .cd-footer-main {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    line-height: 1.55;
}

.a4-footer .cd-footer-company {
    display: inline-block;
    font-size: calc(var(--cd-footer-size) + 1px);
    font-weight: 700 !important;
    line-height: 1.45;
}

.a4-footer .cd-footer-page {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

.a4-section {
    margin: 0 0 10px;
    outline: none;
    border-radius: 2px;
}

.a4-section.is-active {
    box-shadow: inset 0 0 0 1.5px #e23744;
    background: rgba(226, 55, 68, 0.03);
}

.a4-footer.is-active {
    box-shadow: inset 0 0 0 1.5px #e23744;
    background: #dfe3e8;
}

.a4-section,
.a4-section * {
    font-weight: 400 !important;
    text-decoration: none !important;
}

.a4-section .cd-title-block {
    display: block;
    width: 100%;
    text-align: center !important;
    margin: 6px 0 14px;
}

.a4-section .cd-title-block h1 {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    font-size: var(--cd-title-size);
    font-weight: 700 !important;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    border: 0;
    padding: 0;
    text-align: center !important;
}

.a4-section .cd-subtitle {
    margin: 0 0 12px;
    font-size: var(--cd-body-size);
    color: #111;
    font-weight: 400 !important;
    text-align: center;
}

.a4-section .cd-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: left;
    margin-top: 8px;
}

.a4-section .cd-meta-cell {
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 6px 8px;
    min-height: 42px;
}

.a4-section .cd-meta-cell span {
    display: block;
    font-size: 8px;
    color: #52525b;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 3px;
    font-weight: 400 !important;
}

.a4-section .cd-meta-cell strong {
    display: block;
    font-size: var(--cd-body-size);
    font-weight: 400 !important;
    color: #111;
}

.a4-section h1,
.a4-section h2,
.a4-section h3,
.a4-section h4 {
    margin: 10px 0 6px;
    font-size: var(--cd-body-size);
    font-weight: 400 !important;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.45;
    border: 0;
    border-bottom: 0 !important;
    padding: 0;
    text-align: left !important;
    text-decoration: none !important;
}

.a4-section p,
.a4-section li {
    margin: 0 0 6px;
    font-size: var(--cd-body-size);
    line-height: 1.45;
    text-align: left !important;
    font-weight: 400 !important;
}

.a4-section .cd-intro,
.a4-section .cd-body {
    text-align: left !important;
}

.a4-section .cd-note {
    color: #374151;
    font-size: var(--cd-body-size);
    font-weight: 400 !important;
    text-align: left !important;
}

.a4-section .cd-clause {
    margin: 0 0 6px;
    padding-left: 0;
    text-indent: 0;
    text-align: left !important;
    font-weight: 400 !important;
}

.a4-section .cd-clause-no {
    display: inline;
    min-width: 0;
    font-weight: 400 !important;
}

.a4-section .cd-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 4px 0 8px;
    border: 1px solid #e5e7eb;
}

.a4-section .cd-field-row {
    display: grid;
    grid-template-columns: 38% 62%;
    border-bottom: 1px solid #e5e7eb;
}

.a4-section .cd-field-row:last-child {
    border-bottom: 0;
}

.a4-section .cd-field-label,
.a4-section .cd-field-value {
    padding: 5px 7px;
    font-size: var(--cd-body-size);
    line-height: 1.4;
    font-weight: 400 !important;
}

.a4-section .cd-field-label {
    background: #fafafa;
    color: #111;
    border-right: 1px solid #e5e7eb;
}

.a4-section .cd-field-value {
    text-align: left;
}

.a4-section .cd-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 8px;
    font-size: var(--cd-body-size);
    border: 1px solid #000;
}

.a4-section .cd-table th,
.a4-section .cd-table td {
    border: 1px solid #000;
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
    font-weight: 400 !important;
}

.a4-section .cd-table th {
    background: #fafafa;
    font-weight: 400 !important;
}

.a4-section .cd-table .cd-num,
.a4-section .cd-table .cd-check {
    width: 48px;
    text-align: center;
}

.a4-section .cd-check-list,
.a4-section .cd-decl-list,
.a4-section ul,
.a4-section ol {
    margin: 0 0 8px;
    padding-left: 1.15rem;
}

.a4-section .cd-check-list li,
.a4-section .cd-decl-list li {
    margin-bottom: 4px;
    text-align: left;
}

.a4-section .cd-sign-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 8px 0;
}

.a4-section .cd-sign-col {
    border: 1px solid #e5e7eb;
    padding: 8px;
    min-height: 180px;
}

.a4-section .cd-sign-col h3 {
    margin-top: 0;
}

.a4-section .cd-sign-col p {
    text-align: left;
    margin-bottom: 8px;
}

.contract-designer-tools-pane {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    border: 1px dashed #d4d4d8;
    border-radius: 12px;
    background: #fff;
}

.cd-tools-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.cd-tools-actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: stretch;
    padding: 0.7rem 0.75rem;
    border-top: 1px solid #e4e4e7;
    background: #fafafa;
}

.cd-tools-actions .btn-secondary,
.cd-tools-actions .btn-primary {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0 0.85rem;
    font-size: 0.8125rem;
}

.cd-tools-actions a.settings-back.btn-secondary,
.cd-tools-actions button.settings-back.btn-secondary {
    background: var(--karvi-white, #fff);
    border: 1.5px solid var(--karvi-border, #e4e4e7);
    color: var(--karvi-black, #18181b);
}

.cd-tools-actions a.settings-back.btn-secondary:hover,
.cd-tools-actions button.settings-back.btn-secondary:hover {
    background: var(--karvi-surface, #f4f4f5);
    border-color: var(--karvi-black, #18181b);
    color: var(--karvi-black, #18181b);
}

.cd-tools-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 120px;
    padding: 1rem;
    border: 1px dashed #d4d4d8;
    border-radius: 10px;
    background: #fafafa;
    color: #71717a;
    text-align: center;
}

.cd-tools-empty .material-symbols-rounded {
    font-size: 28px;
    color: #a1a1aa;
}

.cd-tools-empty p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    max-width: 16rem;
}

.cd-tools-active.hidden,
.cd-tools-empty.hidden {
    display: none !important;
}

.cd-tool-card {
    background: #fff;
    border: 1px dashed #d4d4d8;
    border-radius: 10px;
    padding: 0.75rem 0.8rem;
}

.cd-logo-card .cd-tool-card-head {
    margin-bottom: 0.5rem;
}

.cd-logo-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.cd-logo-thumb {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0.2rem;
    background: #000;
    border: 1px solid #27272a;
    border-radius: 8px;
    overflow: hidden;
}

.cd-logo-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cd-logo-picker {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    min-width: 0;
    height: 36px;
    border: 1.5px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
}

.cd-logo-picker:hover {
    border-color: #a1a1aa;
}

.cd-logo-picker-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.7rem;
    background: #18181b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid #18181b;
}

.cd-logo-picker-name {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0 0.65rem;
    color: #71717a;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-logo-picker-name.is-selected {
    color: #18181b;
    font-weight: 600;
}

.cd-logo-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.cd-logo-upload-submit,
.cd-logo-remove-submit {
    flex: 0 0 auto;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0 0.85rem;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 8px;
}

.cd-logo-upload-submit {
    background: #18181b;
    color: #fff;
}

.cd-logo-upload-submit:hover {
    background: #09090b;
}

.cd-logo-height {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-top: 0.55rem;
    color: #52525b;
    font-size: 0.75rem;
    font-weight: 600;
}

.cd-logo-height select {
    height: 32px;
    min-width: 5.5rem;
    border: 1.5px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #18181b;
    font-size: 0.75rem;
    padding: 0 0.45rem;
}

.cd-layout-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.cd-layout-control {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    color: #52525b;
    font-size: 0.7rem;
    font-weight: 600;
}

.cd-layout-control select {
    height: 32px;
    border: 1.5px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #18181b;
    font-size: 0.75rem;
    padding: 0 0.4rem;
}

.cd-spacer {
    display: block;
    width: 100%;
    line-height: 0;
    font-size: 0;
    user-select: none;
}

.cd-section-box {
    display: block;
    width: 100%;
}

.cd-field-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cd-field-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fafafa;
    color: #18181b;
    cursor: pointer;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.cd-field-chip:hover,
.cd-field-chip:focus-visible {
    border-color: #e23744;
    background: #fff5f5;
    color: #e23744;
    outline: none;
}

.cd-tool-card-head {
    margin-bottom: 0.55rem;
}

.cd-tool-card-head h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
}

.cd-tool-card-head p {
    margin: 0.2rem 0 0;
    color: #71717a;
    font-size: 0.75rem;
}

.cd-sticky-toolbar {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fafafa;
    padding: 0.35rem;
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #3f3f46;
    cursor: pointer;
}

.rte-btn:hover {
    background: #f4f4f5;
    color: #18181b;
}

.rte-btn .material-symbols-rounded {
    font-size: 18px;
}

.rte-sep {
    width: 1px;
    align-self: stretch;
    margin: 0.2rem 0.25rem;
    background: #e4e4e7;
}

.rte-font-size {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 32px;
    padding: 0 0.4rem;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    background: #fff;
    color: #3f3f46;
}

.rte-font-size .material-symbols-rounded {
    font-size: 18px;
}

.rte-font-size select {
    height: 28px;
    min-width: 3.1rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #18181b;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0 0.15rem;
}

.cd-font-size-unit {
    font-size: 0.7rem;
    font-weight: 700;
    color: #71717a;
    text-transform: lowercase;
}

.cd-insert-field select,
.cd-mapping-row select {
    height: 30px;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    background: #fff;
    color: #18181b;
    font-size: 0.75rem;
    padding: 0 0.4rem;
}

.cd-insert-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.65rem;
    font-size: 0.75rem;
    color: #71717a;
}

.cd-mapping-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 360px;
    overflow: auto;
}

.cd-mapping-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
}

.cd-mapping-row > span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #18181b;
}

@media (max-width: 1100px) {
    body:has(.contract-designer),
    body:has(.contract-designer) .admin-shell {
        height: auto;
        max-height: none;
        overflow: auto;
    }

    body:has(.contract-designer) .admin-shell > .flex-1,
    body:has(.contract-designer) .admin-shell main {
        overflow: visible;
        height: auto;
        max-height: none;
    }

    .contract-designer,
    .contract-designer-grid {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .contract-designer-grid {
        grid-template-columns: 1fr;
    }

    .contract-designer-preview-pane,
    .contract-designer-tools-pane {
        height: min(70vh, 820px);
        max-height: min(70vh, 820px);
    }

    .a4-page {
        width: 100%;
        height: auto;
        min-height: 900px;
    }
}

@media (min-width: 900px) {
    .pdf-grid { grid-template-columns: 1fr 1fr; }
    .pdf-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.join-filters .btn-primary,
.join-filters .btn-secondary,
.join-pager .btn-secondary {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    line-height: 1;
    transform: none;
}

.join-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-color: #fecaca;
    background: #fff1f2;
    color: #9f1239;
    font-size: 0.8125rem;
    font-weight: 600;
}

.join-empty {
    padding: 0.85rem 0.9rem;
    color: #71717a;
    font-size: 0.875rem;
}

.join-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 8.5rem);
    border-radius: 10px;
}

.join-table {
    --jc-row: 34px;
    --jc-head: 30px;
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.join-table col.jc-who { width: 22%; }
.join-table col.jc-contact { width: 22%; }
.join-table col.jc-address { width: 26%; }
.join-table col.jc-refer { width: 72px; }
.join-table col.jc-docs { width: 96px; }
.join-table col.jc-status { width: 104px; }
.join-table col.jc-action { width: 52px; }

.join-refer { flex: 0 0 7.2rem; width: 7.2rem; }

.data-table.join-table thead th,
.data-table.join-table tbody td {
    box-sizing: border-box;
    height: auto;
    min-height: 52px;
    padding: 6px 8px;
    border-right: 1px dashed #d4d4d8;
    border-bottom: 1px dashed #a1a1aa;
    font-size: 0.8125rem;
    line-height: 1.3;
    white-space: normal;
    overflow: hidden;
    vertical-align: middle;
}

.data-table.join-table thead th:last-child,
.data-table.join-table tbody td:last-child {
    border-right: none;
}

.data-table.join-table tr[hidden] {
    display: none;
}

.join-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 40px;
}

.join-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 18px;
    min-width: 0;
}

.join-line .material-symbols-rounded {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: #71717a;
}

.join-line span:last-child,
.join-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.join-line strong {
    font-weight: 800;
    color: #18181b;
}

.data-table.join-table tbody tr.is-draft td { background: #fffbeb; }
.data-table.join-table tbody tr.is-new td,
.data-table.join-table tbody tr.is-pending td { background: #eff6ff; }
.data-table.join-table tbody tr.is-signed td { background: #f0fdf4; }
.data-table.join-table tbody tr.is-reviewed td { background: #f4f4f5; }
.data-table.join-table tbody tr.is-live td { background: #f0fdfa; }
.data-table.join-table tbody tr:hover td { filter: saturate(1.15); }

.join-address {
    white-space: normal;
    line-height: 1.35;
}

.data-table.join-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: var(--jc-head);
    max-height: var(--jc-head);
    line-height: var(--jc-head);
    padding: 0 8px;
    background: #fafafa;
    color: #71717a;
    font-size: 0.625rem;
    letter-spacing: 0.06em;
}

.data-table.join-table tbody td.jc-num,
.data-table.join-table tbody td.jc-mono {
    font-variant-numeric: tabular-nums;
}

.data-table.join-table tbody td.jc-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
}

.data-table.join-table tbody td.jc-status-cell {
    line-height: 1;
    text-overflow: clip;
}

.data-table.join-table .join-empty-cell {
    height: 42px;
    max-height: none;
    line-height: 42px;
    text-align: center;
    color: #71717a;
}

.join-pager-actions {
    display: flex;
    gap: 0.4rem;
}

.data-table.join-table tbody td.jc-action-cell {
    text-overflow: clip;
    text-align: right;
}

.join-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #18181b;
    text-decoration: none;
    cursor: pointer;
}

.join-icon-btn .material-symbols-rounded {
    font-size: 18px;
}

.join-icon-btn:hover {
    border-color: #18181b;
}

.join-doc-status,
button.join-pill.join-status-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 92px;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.22);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

button.join-doc-status,
button.join-doc-status.is-pending {
    background: #b45309;
    border-color: #92400e;
    color: #fff;
}

button.join-doc-status.is-done {
    background: #15803d;
    border-color: #166534;
    color: #fff;
}

button.join-doc-status.is-rejected {
    background: #b91c1c;
    border-color: #991b1b;
    color: #fff;
}

button.join-pill.join-status-btn.is-draft {
    background: #b45309;
    border-color: #92400e;
    color: #fff;
}

button.join-pill.join-status-btn.is-new,
button.join-pill.join-status-btn.is-pending {
    background: #1d4ed8;
    border-color: #1e3a8a;
    color: #fff;
}

button.join-pill.join-status-btn.is-signed {
    background: #15803d;
    border-color: #166534;
    color: #fff;
}

button.join-pill.join-status-btn.is-live {
    background: #0d9488;
    border-color: #0f766e;
    color: #fff;
    font-weight: 800;
}

button.join-pill.join-status-btn.is-reviewed {
    background: #3f3f46;
    border-color: #18181b;
    color: #fff;
}

button.join-doc-status:hover,
button.join-pill.join-status-btn:hover {
    filter: brightness(1.08);
}

.join-doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.join-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 58px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #f4f4f5;
    border-radius: 10px;
    background: #fafafa;
}

.join-doc-row.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

.join-doc-row.is-rejected {
    border-color: #fecaca;
    background: #fef2f2;
}

.join-doc-row.is-verified {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.join-doc-copy {
    min-width: 0;
    flex: 1;
}

.join-doc-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.join-doc-name {
    margin: 0;
    color: #18181b;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

.join-doc-meta {
    display: block;
    margin-top: 0.22rem;
    color: #71717a;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.join-doc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.25;
}

.join-doc-badge.is-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.join-doc-badge.is-verified {
    background: #dcfce7;
    color: #166534;
}

.join-doc-badge.is-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.join-icon-btn.is-verify {
    color: #166534;
}

.join-icon-btn.is-reject {
    color: #b45309;
}

.join-icon-btn.is-delete {
    color: #b91c1c;
}

.join-doc-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.35rem;
}

.join-doc-actions .join-icon-btn {
    width: 32px;
    height: 32px;
}

.join-status-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.join-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.join-modal-actions .btn-primary,
.join-modal-actions .btn-secondary {
    height: 36px;
    min-height: 36px;
    padding: 0 0.85rem;
}

#teamForm .join-input {
    width: 100%;
}

.join-status-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.join-status-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 0.9rem;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    background: #fafafa;
    color: #3f3f46;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

.join-status-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.join-status-chip:has(input:checked) {
    background: #18181b;
    border-color: #18181b;
    color: #fff;
}

.join-status-form input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    margin-top: 0.15rem;
    padding: 0 0.7rem;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    font: inherit;
    font-size: 0.8125rem;
}

.join-status-error {
    margin: 0;
    color: #9f1239;
    font-size: 0.8125rem;
    font-weight: 600;
}

.join-detail-dialog {
    width: min(100%, 40rem);
    max-height: min(80vh, 40rem);
    overflow: auto;
    padding: 0.85rem 0.95rem 1rem;
}

.join-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.join-detail-head h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.join-detail-kicker {
    margin: 0 0 0.15rem;
    color: #71717a;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.join-detail-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: #f4f4f5;
    color: #3f3f46;
    cursor: pointer;
}

.join-detail-groups {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.join-group h4 {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #71717a;
}

.join-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.join-detail-field {
    box-sizing: border-box;
    height: 46px;
    min-width: 0;
    padding: 0.3rem 0.55rem;
    border: 1px solid #f4f4f5;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.join-detail-field.is-wide {
    grid-column: 1 / -1;
    height: auto;
    min-height: 46px;
}

.join-detail-field span {
    display: block;
    color: #a1a1aa;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-transform: uppercase;
}

.join-detail-field strong {
    display: block;
    margin-top: 0.12rem;
    color: #18181b;
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.join-detail-field.is-wide strong {
    white-space: normal;
}

.join-detail-field strong.is-empty {
    color: #d4d4d8;
    font-weight: 500;
}

@media (max-width: 640px) {
    .join-group-grid { grid-template-columns: 1fr; }
    .join-detail-field.is-wide { grid-column: auto; }
}

.join-pill {
    display: inline-flex;
    align-items: center;
    height: 1.25rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    border: 1px solid #e4e4e7;
    background: #fff;
    color: #3f3f46;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.join-pill.is-draft { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.join-pill.is-pending,
.join-pill.is-new { color: #1e3a8a; background: #eff6ff; border-color: #bfdbfe; }
.join-pill.is-signed { color: #14532d; background: #f0fdf4; border-color: #bbf7d0; }
.join-pill.is-reviewed { color: #3f3f46; background: #f4f4f5; border-color: #e4e4e7; }
.join-pill.is-live { color: #0f766e; background: #ccfbf1; border-color: #5eead4; font-weight: 800; }

.join-error p { margin: 0; }

.join-pager {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    height: 36px;
    padding: 0 8px;
    border-top: 1px solid var(--karvi-border);
    background: #fafafa;
}

.join-pager p {
    margin: 0;
    font-size: 0.75rem;
    color: #71717a;
}


@media (max-width: 768px) {
    .data-table-wrap.join-table-wrap:not(.customer-documents-table-wrap):not(.lieferando-services-table-wrap) {
        display: block;
    }
}

