:root {
    color-scheme: light;
    --color-white: var(--sw-surface);
    --neutral-25: var(--sw-surface-subtle);
    --neutral-50: var(--sw-bg);
    --neutral-100: var(--sw-surface-muted);
    --neutral-200: var(--sw-border);
    --neutral-300: var(--sw-border-strong);
    --neutral-500: var(--sw-text-muted);
    --neutral-700: var(--sw-text-secondary);
    --neutral-900: var(--sw-text-primary);
    --accent: var(--sw-primary);
    --accent-strong: var(--sw-primary);
    --accent-soft: var(--sw-primary-soft);
    --success: var(--sw-success);
    --success-soft: var(--sw-success-soft);
    --warning: var(--sw-warning);
    --warning-soft: var(--sw-warning-soft);
    --danger: var(--sw-danger);
    --danger-soft: var(--sw-danger-soft);
    --info: var(--sw-info);
    --info-soft: var(--sw-info-soft);
    --ink: var(--neutral-700);
    --ink-strong: var(--neutral-900);
    --muted: var(--neutral-500);
    --line: var(--neutral-200);
    --line-strong: var(--neutral-300);
    --panel: var(--color-white);
    --surface: var(--sw-bg);
    --surface-raised: var(--neutral-25);
    --sf-bg: var(--surface);
    --sf-surface: var(--panel);
    --sf-surface-muted: var(--surface-raised);
    --sf-sidebar: var(--sw-sidebar);
    --sf-sidebar-hover: var(--sw-sidebar-hover);
    --sf-text-primary: var(--ink-strong);
    --sf-text-secondary: var(--muted);
    --sf-border: var(--line);
    --sf-primary: var(--accent);
    --sf-primary-hover: var(--accent-strong);
    --sf-danger: var(--danger);
    --sf-success: var(--success);
    --sf-warning: var(--warning);
    --radius-xs: var(--sw-radius-sm);
    --radius-sm: var(--sw-radius-md);
    --radius-md: var(--sw-radius-lg);
    --radius-lg: var(--sw-radius-xl);
    --radius-xl: var(--sw-radius-xl);
    --sf-radius-sm: var(--radius-xs);
    --sf-radius-md: var(--radius-sm);
    --shadow-sm: var(--sw-shadow-sm);
    --shadow-md: var(--sw-shadow-md);
    --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.12);
    --sf-shadow-sm: var(--shadow-sm);
    --sf-shadow-md: var(--shadow-md);
    --shadow: var(--shadow-md);
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 2.5rem;
    --text-caption: 0.76rem;
    --text-meta: 0.82rem;
    --text-body: 0.94rem;
    --text-section: 1.05rem;
    --text-title: clamp(1.55rem, 2vw, 2rem);
    --leading-tight: 1.12;
    --leading-body: 1.5;
    --transition-fast: 150ms ease;
    --transition-base: 220ms ease;
    --z-header: 20;
    --z-drawer: 40;
    --z-toast: 60;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--surface);
    font-size: var(--text-body);
    line-height: var(--leading-body);
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.sf-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    display: inline-block;
    color: currentColor;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.sf-icon-dashboard { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='8' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='15' width='7' height='6' rx='1'/%3E%3C/svg%3E"); }
.sf-icon-documents { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.sf-icon-templates { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 7h8M8 11h8M8 15h5'/%3E%3C/svg%3E"); }
.sf-icon-contacts, .sf-icon-team { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9.5' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.sf-icon-activity { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3 8 4-16 3 8h4'/%3E%3C/svg%3E"); }
.sf-icon-settings { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1A2 2 0 1 1 4.2 17l.1-.1A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-1.6-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9l-.1-.1A2 2 0 1 1 7 4.2l.1.1A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-1.6V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1A2 2 0 1 1 19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.1a2 2 0 1 1 0 4H21a1.7 1.7 0 0 0-1.6 1z'/%3E%3C/svg%3E"); }
.sf-icon-code { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 18 6-6-6-6M8 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.sf-icon-search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.sf-icon-plus { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.sf-icon-workflow { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='6' height='6' rx='1'/%3E%3Crect x='15' y='14' width='6' height='6' rx='1'/%3E%3Cpath d='M9 7h4a4 4 0 0 1 4 4v3M15 17h-4a4 4 0 0 1-4-4v-3'/%3E%3C/svg%3E"); }
.sf-icon-billing { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M7 15h2M12 15h4'/%3E%3C/svg%3E"); }
.sf-icon-security { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.sf-icon-upload { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12'/%3E%3C/svg%3E"); }
.sf-icon-fields { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='4' rx='1'/%3E%3Crect x='4' y='15' width='10' height='4' rx='1'/%3E%3Cpath d='M4 12h16'/%3E%3C/svg%3E"); }
.sf-icon-send { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E"); }
.sf-icon-signature { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18M5 16c3-8 5-8 6-1 1 5 4-7 8-3'/%3E%3C/svg%3E"); }
.sf-icon-link { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1 0l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.1 0l-2 2A5 5 0 0 0 12 20.1l1.1-1.1'/%3E%3C/svg%3E"); }

.brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: var(--sw-radius-md);
    color: var(--sw-text-inverse);
    background: var(--sw-gradient);
    font-size: 0.76rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 151, 229, 0.18);
}

.brand-logo-image {
    display: block;
    width: clamp(10.5rem, 18vw, 13rem);
    height: auto;
    object-fit: contain;
}

.brand-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-button-text {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
    margin: 0;
}

h1 {
    color: var(--ink-strong);
    font-size: var(--text-title);
    font-weight: 780;
    line-height: var(--leading-tight);
}

h2 {
    color: var(--ink-strong);
    font-size: var(--text-section);
    font-weight: 720;
    line-height: 1.25;
}

button,
.button {
    border: 1px solid var(--sw-primary);
    border-radius: var(--radius-sm);
    background: var(--sw-primary);
    color: #ffffff;
    min-height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

button:hover,
.button:hover {
    background: var(--sw-primary-hover);
    border-color: var(--sw-primary-hover);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 151, 229, 0.18);
}

button.secondary,
.button.secondary {
    color: var(--sw-text-primary);
    background: var(--sw-surface);
    border-color: var(--sw-border);
    box-shadow: var(--shadow-sm);
}

button.secondary:hover,
.button.secondary:hover {
    color: var(--sw-primary);
    border-color: var(--sw-border-strong);
    background: var(--sw-surface-muted);
    box-shadow: var(--shadow-sm);
}

button.danger,
.button.danger {
    background: var(--danger);
    border-color: var(--danger);
}

button.danger:hover,
.button.danger:hover {
    background: #B91C1C;
    border-color: #B91C1C;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.16);
}

.icon-only {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.notification-bell {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.56;
    transform: none;
    box-shadow: none;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--sw-border);
    border-radius: var(--radius-sm);
    padding: 0.66rem 0.75rem;
    background: var(--sw-surface);
    color: var(--sw-text-primary);
    font: inherit;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--sw-primary);
    box-shadow: 0 0 0 3px var(--sw-focus-ring);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--sw-primary);
}

input[type="color"] {
    min-height: 2.5rem;
    padding: 0.25rem;
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

label {
    display: grid;
    gap: 0.38rem;
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th,
td {
    padding: 0.88rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: var(--sw-surface-subtle);
}

th {
    color: var(--sw-text-muted);
    background: var(--sw-surface-muted);
    font-size: var(--text-caption);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.page-header > div {
    display: grid;
    gap: 0.35rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.five {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.panel {
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.panel > h2 {
    margin-bottom: var(--space-3);
}

.metric {
    --metric-icon-color: var(--muted);
    display: grid;
    gap: 0.55rem;
    min-height: 112px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--neutral-25);
    box-shadow: none;
}

.metric:nth-child(2) {
    --metric-icon-color: var(--warning);
}

.metric:nth-child(3),
.metric:nth-child(5) {
    --metric-icon-color: var(--success);
}

.metric:nth-child(4) {
    --metric-icon-color: var(--danger);
}

.metric span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--muted);
    font-size: var(--text-caption);
    font-weight: 800;
    text-transform: uppercase;
}

.metric span::before {
    content: "";
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: currentColor;
    color: var(--metric-icon-color);
    -webkit-mask: var(--metric-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E")) center / contain no-repeat;
    mask: var(--metric-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E")) center / contain no-repeat;
}

.metric strong {
    color: var(--ink-strong);
    font-size: 1.5rem;
    line-height: 1;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-height: 1.55rem;
    border-radius: 999px;
    border: 0;
    padding: 0.18rem 0.62rem;
    background: var(--sw-surface-muted);
    color: var(--sw-text-secondary);
    font-size: var(--text-caption);
    font-weight: 800;
    white-space: nowrap;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.92rem;
}

.signing-order-mode {
    display: grid;
    gap: 0.28rem;
    align-content: center;
    min-height: 4.32rem;
    padding: 0.76rem 0.85rem;
    border: 1px solid #cfe0ff;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f8fbff, var(--accent-soft));
    color: var(--ink);
}

.signing-order-mode strong {
    color: var(--accent-strong);
    font-size: 0.88rem;
}

.signing-order-mode span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.35;
}

.recipient-match-card {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    margin-top: 0.9rem;
    padding: 0.82rem 0.92rem;
    border: 1px solid #cae8d6;
    border-radius: var(--radius-md);
    background: #f6fbf8;
    color: var(--success);
}

.recipient-match-card .sf-icon {
    margin-top: 0.08rem;
}

.recipient-match-card div {
    min-width: 0;
    display: grid;
    gap: 0.18rem;
}

.recipient-match-card strong {
    color: var(--ink-strong);
}

.recipient-match-card span:last-child {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    margin-top: 1rem;
}

.error {
    border: 1px solid #f1b7b2;
    border-radius: var(--radius-md);
    background: var(--danger-soft);
    color: var(--danger);
    padding: 0.78rem 0.9rem;
    white-space: pre-wrap;
}

.muted {
    color: var(--muted);
}

.wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.wizard-steps button {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: none;
}

.wizard-steps button.active {
    background: var(--ink-strong);
    color: #ffffff;
    border-color: var(--ink-strong);
}

.field-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.field-chip {
    --signer-accent: var(--accent);
    --signer-bg: rgba(37, 99, 235, 0.12);
    --signer-text: var(--accent-strong);
    border: 1px solid #b8c7ff;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: #1e3a8a;
    padding: 0.45rem 0.58rem;
    cursor: grab;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.field-chip:hover {
    border-color: #85a6ff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.prepare-grid {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.prepare-sidebar {
    position: sticky;
    top: 1rem;
}

.prepare-document-panel {
    min-width: 0;
    display: grid;
    justify-items: center;
}

.prepare-document-panel .document-toolbar {
    width: 100%;
}

.document-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.document-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.field-inspector {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.field-inspector h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.pdf-workspace {
    position: relative;
    width: min(100%, 980px);
    margin-inline: auto;
    aspect-ratio: 595 / 842;
    min-height: 520px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.pdf-preview,
.pdf-field-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pdf-preview {
    display: block;
    border: 0;
    background: #f8fafc;
    pointer-events: auto;
}

.pdf-preview-frame {
    border: 0;
}

.pdf-scroll-workspace {
    width: min(100%, 1120px);
    height: min(78vh, 940px);
    min-height: 620px;
    aspect-ratio: auto;
    overflow: auto;
    padding: 1rem;
    background: #eef2f7;
    overscroll-behavior: contain;
}

.pdf-scroll-workspace .pdf-page-stack {
    position: relative;
    inset: auto;
    display: grid;
    gap: 1rem;
    width: min(100%, 920px);
    height: auto;
    margin-inline: auto;
    background: transparent;
}

.pdf-rendered-page {
    position: relative;
    max-width: 100%;
    margin-inline: auto;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ea;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

.pdf-rendered-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.pdf-scroll-field-layer {
    inset: 1rem auto auto 50%;
    width: min(calc(100% - 2rem), 880px);
    min-height: calc(100% - 2rem);
    transform: translateX(-50%);
}

.pdf-preview.is-loading {
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent),
        #eef2f7;
    background-size: 220% 100%;
    animation: sf-sheen 1.1s linear infinite;
}

.pdf-field-layer {
    z-index: 2;
    touch-action: none;
    pointer-events: none;
}

.pdf-workspace.field-drop-active .pdf-field-layer {
    pointer-events: auto;
}

.pdf-field-layer:empty::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 1px dashed #cbd5d0;
    pointer-events: none;
}

.pdf-fallback {
    display: grid;
    place-items: center;
    min-height: 18rem;
    padding: 2rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    font-weight: 700;
}

.pdf-workspace.pdf-load-failed .pdf-field-layer {
    display: none;
}

.placed-field {
    --signer-accent: var(--accent);
    --signer-bg: rgba(37, 99, 235, 0.12);
    --signer-text: var(--accent-strong);
    position: absolute;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.32rem;
    border: 2px solid var(--signer-accent);
    border-radius: 6px;
    background: linear-gradient(90deg, var(--signer-bg), rgba(255, 255, 255, 0.9) 58%);
    color: var(--signer-text);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.24rem 1.55rem 0.24rem 0.4rem;
    overflow: hidden;
    cursor: move;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
    user-select: none;
    touch-action: none;
}

.placed-field.selected {
    border-color: var(--signer-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--signer-accent) 22%, transparent), 0 8px 22px rgba(15, 23, 42, 0.18);
}

.placed-field.pending {
    border-style: dashed;
    opacity: 0.72;
    pointer-events: none;
}

.placed-field-icon {
    width: 0.92rem;
    height: 0.92rem;
    color: var(--signer-text);
}

.placed-field-copy {
    min-width: 0;
}

.placed-field-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.placed-field-code {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 1.1rem;
    height: 1.1rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--signer-accent) 28%, transparent);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--signer-text);
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
}

.resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
}

.resize-handle::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--signer-text, var(--accent-strong));
    border-bottom: 2px solid var(--signer-text, var(--accent-strong));
}

.document-frame {
    width: 100%;
    min-height: 680px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.signing-document-workspace {
    width: min(100%, 980px);
    min-height: 680px;
}

.modern-signing-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    align-items: start;
}

.signing-document-panel {
    min-width: 0;
}

.signing-task-panel {
    position: sticky;
    top: 1rem;
}

.signing-pdf-frame {
    display: block;
}

.signing-field-layer {
    pointer-events: auto;
}

.signing-field {
    position: absolute;
    pointer-events: auto;
    display: flex;
    align-items: stretch;
    min-width: 42px;
    min-height: 24px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.signing-field.missing {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14), 0 2px 10px rgba(15, 23, 42, 0.12);
}

.signing-field.is-filled {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.signing-field input,
.signing-field select {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0.25rem 0.35rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 0.78rem;
}

.signing-field-label {
    position: absolute;
    inset: 0.15rem 0.35rem auto;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    color: var(--sw-primary);
    font-size: 0.55rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signing-field:has(.signing-field-label) input,
.signing-field:has(.signing-field-label) select {
    padding-top: 0.8rem;
}

.signing-field.is-filled input,
.signing-field.is-filled select {
    background: rgba(255, 255, 255, 0.74);
    color: #111827;
    font-weight: 650;
}

.signing-field input[type="date"] {
    color-scheme: light;
    cursor: pointer;
    min-width: 7.5rem;
}

.signing-field-signature {
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.signing-field-signature.is-filled {
    background: transparent;
    color: #111827;
}

.signature-field-preview {
    max-width: 96%;
    max-height: 86%;
    object-fit: contain;
    display: block;
}

.signature-field-typed {
    max-width: 96%;
    display: block;
    overflow: hidden;
    color: #111827;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: clamp(0.9rem, 2vw, 1.55rem);
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signing-field-signature:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.signing-field-signature.is-filled:hover {
    box-shadow: none;
}

.signing-progress-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
}

.signature-modal {
    width: min(640px, 100%);
    max-height: min(760px, 92vh);
    overflow: auto;
    padding: var(--space-5);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.typed-signature-input {
    font-size: 1.6rem;
    font-family: Georgia, "Times New Roman", serif;
}

.signature-canvas {
    width: 100%;
    height: 180px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: #ffffff;
    touch-action: none;
}

@media (max-width: 720px) {
    .prepare-grid {
        grid-template-columns: 1fr;
    }

    .prepare-sidebar {
        position: static;
    }

    .document-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .modern-signing-grid {
        grid-template-columns: 1fr;
    }

    .signing-task-panel {
        position: static;
    }

    body {
        font-size: 14px;
    }

    .page-header {
        display: grid;
    }

    th,
    td {
        padding: 0.7rem;
    }
}

.public-site {
    min-height: 100vh;
    background: #f7f5ef;
    display: flex;
    flex-direction: column;
}

.public-site > main {
    flex: 1;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem clamp(1rem, 4vw, 4rem);
    border-bottom: 1px solid rgba(16, 24, 32, 0.08);
    background: rgba(255, 252, 246, 0.9);
    backdrop-filter: blur(14px);
}

.public-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #101915;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0;
}

.public-logo .brand-logo-image {
    width: clamp(11rem, 15vw, 13.5rem);
}

.public-nav,
.public-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-nav a,
.public-actions a:not(.button) {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #31413b;
    font-weight: 720;
    font-size: 0.92rem;
}

.public-nav .sf-icon {
    width: 0.95rem;
    height: 0.95rem;
    color: #547064;
}

.landing-hero {
    position: relative;
    min-height: clamp(560px, 72vh, 760px);
    display: grid;
    align-items: end;
    overflow: hidden;
    padding: clamp(5rem, 10vw, 7rem) clamp(1rem, 4vw, 4rem) clamp(2.5rem, 6vw, 4.5rem);
    color: #f7fbf8;
    background: #12231e;
    isolation: isolate;
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 46%;
    background: rgba(18, 35, 30, 0.88);
    z-index: -1;
}

.hero-product-scene {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: grid;
    align-content: center;
    gap: 1.2rem;
    padding: clamp(5rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem) 3rem;
    opacity: 0.92;
}

.scene-toolbar,
.scene-grid {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.scene-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    color: #cce9dc;
    font-size: 0.8rem;
    font-weight: 760;
}

.scene-toolbar span {
    border: 1px solid rgba(204, 233, 220, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    padding: 0.42rem 0.7rem;
}

.scene-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 0.85fr);
    grid-template-rows: auto auto;
    gap: 1rem;
    transform: translateY(-1rem);
}

.scene-document,
.scene-panel,
.scene-timeline {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(12px);
}

.scene-document {
    min-height: 360px;
    grid-row: span 2;
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 1.2rem;
    background: #fbfaf5;
}

.document-header-line,
.document-line {
    height: 0.72rem;
    border-radius: 999px;
    background: #d8ded8;
}

.document-header-line {
    width: 42%;
    height: 1rem;
    background: #162a24;
}

.document-line.wide {
    width: 88%;
}

.document-line {
    width: 72%;
}

.document-line.short {
    width: 48%;
}

.signature-field {
    width: min(280px, 70%);
    margin-top: 1.2rem;
    border: 1px solid #3c7f64;
    border-radius: 8px;
    background: #e8f6ef;
    color: #123d2f;
    padding: 0.85rem 1rem;
    font-weight: 820;
}

.signature-field.accent {
    justify-self: end;
    border-color: #c6862e;
    background: #fff3dc;
    color: #6c430a;
}

.scene-panel,
.scene-timeline {
    display: grid;
    align-content: start;
    gap: 0.8rem;
    padding: 1rem;
}

.scene-panel-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #dbece5;
    font-weight: 720;
}

.scene-panel-row.strong {
    color: #ffffff;
    font-size: 1rem;
}

.scene-progress {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.scene-progress span {
    display: block;
    width: 92%;
    height: 100%;
    background: #43c78f;
}

.scene-timeline strong {
    color: #ffffff;
}

.scene-timeline span {
    border-left: 2px solid #43c78f;
    color: #dbece5;
    padding-left: 0.7rem;
    font-weight: 700;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    display: grid;
    gap: 1rem;
}

.eyebrow {
    color: #2b7259;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-hero .eyebrow {
    color: #9fe1c3;
}

.hero-content h1 {
    color: #ffffff;
    font-size: clamp(4rem, 12vw, 8.2rem);
    line-height: 0.85;
    font-weight: 900;
}

.hero-lede {
    max-width: 680px;
    color: #d7e6de;
    font-size: clamp(1.1rem, 2vw, 1.36rem);
    line-height: 1.65;
}

.hero-secondary {
    color: #f7fbf8 !important;
    border-color: rgba(255, 255, 255, 0.26) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    color: #cfe4da;
    font-size: 0.9rem;
    font-weight: 740;
}

.hero-proof span {
    border-left: 2px solid #43c78f;
    padding-left: 0.65rem;
}

.marketing-section {
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 4rem);
}

.trust-section {
    padding-top: 1rem;
}

.marketing-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding-top: clamp(3rem, 7vw, 6rem);
}

.hero-copy {
    display: grid;
    gap: 1.25rem;
    max-width: 680px;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 6vw, 5.3rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.hero-copy p {
    color: #4d5b56;
    font-size: 1.18rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.product-mock {
    display: grid;
    gap: 0.75rem;
    border: 1px solid #d6ddd9;
    border-radius: 10px;
    background: #101820;
    color: #edf2ef;
    padding: 1rem;
    box-shadow: var(--sf-shadow-md);
}

.mock-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    padding: 1rem;
}

.mock-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mock-row:last-child {
    border-bottom: 0;
}

.trust-strip,
.feature-grid,
.solution-grid,
.template-grid,
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.trust-strip span,
.feature-card,
.solution-card,
.template-preview,
.pricing-card {
    border: 1px solid var(--sf-border);
    border-radius: 8px;
    background: var(--sf-surface);
    padding: 1rem;
    box-shadow: var(--sf-shadow-sm);
}

.trust-strip span {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 4.2rem;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 30px rgba(16, 24, 32, 0.06);
}

.trust-strip .sf-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #2357c6;
}

.feature-card,
.solution-card,
.pricing-card {
    display: grid;
    gap: 0.55rem;
    position: relative;
    overflow: hidden;
    min-height: 12rem;
    align-content: start;
    border-color: rgba(16, 24, 32, 0.08);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 16px 38px rgba(16, 24, 32, 0.08);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.feature-card::after,
.solution-card::after {
    content: "";
    position: absolute;
    inset: auto -2rem -2.5rem auto;
    width: 7rem;
    height: 7rem;
    border: 1px solid rgba(35, 87, 198, 0.08);
    border-radius: 999px;
}

.feature-card:hover,
.solution-card:hover {
    transform: translateY(-2px);
    border-color: rgba(35, 87, 198, 0.22);
    box-shadow: 0 24px 54px rgba(16, 24, 32, 0.12);
}

.feature-icon {
    width: 2.45rem;
    height: 2.45rem;
    display: grid;
    place-items: center;
    border-radius: 7px;
    border: 1px solid #cbd7ff;
    background: #eef3ff;
    color: #2357c6;
}

.feature-icon::before {
    content: "";
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.showcase-dark .feature-card {
    color: #eef3f0;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.showcase-dark .feature-card h2 {
    color: #ffffff;
}

.showcase-dark .feature-card .muted {
    color: #bdccc6;
}

.showcase-dark .feature-icon {
    color: #9db8ff;
    border-color: rgba(157, 184, 255, 0.28);
    background: rgba(157, 184, 255, 0.12);
}

.showcase-dark {
    color: #eef3f0;
    background: #101820;
}

.public-footer {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 2rem clamp(1rem, 4vw, 4rem);
    border-top: 1px solid rgba(16, 24, 32, 0.1);
    background: #ebe7df;
}

.public-footer div {
    display: grid;
    align-content: start;
    gap: 0.45rem;
}

.footer-logo-image {
    width: 12rem;
    max-width: 100%;
    height: auto;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
    background: #f5f3ee;
}

.auth-brand-panel {
    display: grid;
    align-content: space-between;
    gap: 2rem;
    padding: clamp(2rem, 5vw, 4rem);
    color: #edf2ef;
    background: #101820;
}

.auth-brand-panel .public-logo {
    color: #ffffff;
}

.auth-brand-panel .brand-logo-image,
.workspace-brand .brand-logo-image {
    filter: brightness(0) invert(1);
}

.auth-logo-image {
    width: clamp(12rem, 24vw, 16rem);
}

.auth-brand-panel h1 {
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

.auth-brand-panel p {
    color: #b9c5c0;
    max-width: 560px;
    line-height: 1.7;
}

.auth-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auth-proof span {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    color: #d8e3de;
}

.auth-card {
    display: grid;
    align-content: center;
    padding: clamp(1rem, 5vw, 5rem);
}

.auth-form {
    width: min(100%, 520px);
    display: grid;
    gap: 1rem;
    margin: auto;
}

.premium-auth-form {
    gap: 1.05rem;
}

.auth-form-header {
    display: grid;
    gap: 0.45rem;
}

.password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.auth-options,
.check-row,
.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.auth-options {
    justify-content: space-between;
}

.auth-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.auth-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.workspace-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    background: var(--surface);
}

.workspace-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--sf-sidebar);
    color: #eef3f0;
}

.workspace-sidebar > .workspace-nav {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

.workspace-brand {
    display: grid;
    gap: 0.8rem;
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #ffffff;
    font-weight: 850;
    font-size: 1.22rem;
}

.workspace-logo-image {
    width: min(13.5rem, 100%);
}

.workspace-brand span,
.workspace-user span {
    color: #9fb0a9;
    font-size: 0.78rem;
    font-weight: 700;
}

.workspace-switcher {
    display: grid;
    justify-items: start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.7rem;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    box-shadow: none;
}

.workspace-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.workspace-switcher strong {
    font-size: 0.86rem;
}

.workspace-nav {
    display: grid;
    gap: 0.25rem;
    align-content: start;
    padding: 0.9rem;
}

.workspace-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #b7c2d1;
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.8rem 0.72rem 0.9rem;
    font-weight: 760;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.workspace-nav a .sf-icon {
    width: 1.08rem;
    height: 1.08rem;
    color: #8b97a8;
    transition: color var(--transition-fast);
}

.workspace-nav a:hover {
    background: var(--sf-sidebar-hover);
    text-decoration: none;
}

.workspace-nav a.active {
    color: #f8fbff;
    background: rgba(37, 99, 235, 0.16);
}

.workspace-nav a.active::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0.55rem;
    bottom: 0.55rem;
    width: 3px;
    border-radius: 999px;
    background: var(--accent);
}

.workspace-nav a.active .sf-icon {
    color: #60a5fa;
}

.nav-group {
    display: grid;
    gap: 0.25rem;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.8rem 0.35rem;
    margin-top: 0.4rem;
    background: transparent;
    border: none;
    color: #7f8ea3;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-group-toggle:hover {
    color: #b7c2d1;
    box-shadow: none;
}

.nav-group-chevron {
    display: inline-flex;
    transition: transform var(--transition-fast);
}

.nav-group-chevron.expanded {
    transform: rotate(180deg);
}

.nav-group-items {
    display: grid;
    gap: 0.25rem;
}

.workspace-user {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-user .text-button {
    grid-column: 1 / -1;
    color: #edf2ef;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.avatar {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8edff;
    color: #1d47a3;
    font-weight: 850;
}

.workspace-main {
    min-width: 0;
}

.workspace-topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(220px, 1fr) auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--sf-border);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.breadcrumbs {
    color: var(--sf-text-secondary);
    font-weight: 780;
    text-transform: capitalize;
}

.global-search input {
    min-height: 2.35rem;
    padding-left: 2.2rem;
}

.topbar-title {
    display: grid;
    gap: 0.08rem;
}

.topbar-title strong {
    color: var(--ink-strong);
    font-size: 0.98rem;
}

.global-search {
    position: relative;
}

.global-search .sf-icon {
    position: absolute;
    left: 0.74rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: #83918b;
}

.workspace-content {
    padding: 1.25rem;
}

.workspace-loading {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    color: #d7e6de;
    background: #12231e;
}

.workspace-loading-panel {
    width: min(520px, 100%);
    display: grid;
    justify-items: start;
    gap: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: clamp(1.5rem, 5vw, 2.4rem);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.workspace-loading-panel h1 {
    color: #ffffff;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1;
}

.workspace-loading-panel p:not(.eyebrow) {
    color: #d7e6de;
    line-height: 1.65;
}

.premium-page-header {
    align-items: end;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
        #ffffff;
    box-shadow: var(--shadow);
}

.premium-page-header h1 {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.premium-panel {
    border-color: #d7e0dc;
    box-shadow: 0 10px 26px rgba(21, 35, 31, 0.06);
}

.section-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-header.compact {
    margin-bottom: 0.75rem;
}

.section-header > div {
    display: grid;
    gap: 0.2rem;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.premium-metric {
    min-height: 126px;
    padding: 1rem;
    border: 0;
    background: var(--neutral-25);
    box-shadow: none;
}

.premium-metric:nth-child(1) {
    --metric-icon-color: var(--neutral-500);
    --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E");
}

.premium-metric:nth-child(2) {
    --metric-icon-color: var(--warning);
    --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}

.premium-metric:nth-child(3) {
    --metric-icon-color: var(--success);
    --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.premium-metric:nth-child(4) {
    --metric-icon-color: var(--danger);
    --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E");
}

.premium-metric:nth-child(5) {
    --metric-icon-color: var(--info);
    --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m19 9-5 5-4-4-3 3'/%3E%3C/svg%3E");
}

.premium-metric small {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 1rem;
    margin-top: 1rem;
}

.quick-action-list {
    display: grid;
    gap: 0.7rem;
}

.quick-action {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--ink);
    background: var(--surface-raised);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.quick-action:hover {
    border-color: #b8c7ff;
    background: var(--accent-soft);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quick-action .sf-icon {
    grid-row: span 2;
    color: var(--accent-strong);
}

.quick-action small,
.document-cell small {
    color: var(--muted);
}

.empty-state {
    display: grid;
    place-items: center;
    gap: var(--space-2);
    min-height: 220px;
    padding: var(--space-5);
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.06), transparent 32%),
        var(--neutral-25);
}

.empty-state .sf-icon {
    width: 2.15rem;
    height: 2.15rem;
    color: var(--accent-strong);
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.skeleton-card {
    min-height: 150px;
    border-radius: var(--radius-md);
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent),
        var(--neutral-100);
    background-size: 220% 100%;
    animation: sf-sheen 1.1s linear infinite;
}

.skeleton-card.wide {
    grid-column: 1 / -1;
}

.document-control-panel {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.search-control {
    position: relative;
}

.search-control .sf-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #87948e;
}

.search-control input {
    padding-left: 2.45rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
    gap: 0.75rem;
    align-items: end;
}

.table-panel {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.data-table th {
    color: var(--muted);
    font-size: var(--text-caption);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
    background: var(--neutral-25);
}

.data-table td,
.data-table th {
    border-bottom: 1px solid var(--line);
    padding: 0.82rem 0.65rem;
    text-align: left;
}

.data-table tbody tr:hover {
    background: var(--accent-soft);
}

.document-cell {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
    align-items: center;
    color: var(--ink);
}

.document-cell span:last-child {
    display: grid;
    gap: 0.12rem;
}

.contact-control-panel {
    margin-bottom: 1rem;
}

.contact-cell {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.contact-avatar {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid #cfe0ff;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
}

.contact-cell strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.doc-thumb {
    width: 2.3rem;
    height: 2.7rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.status-draft { background: var(--neutral-100); color: var(--neutral-700); }
.status-sent,
.status-awaitingsignature,
.status-viewed,
.status-partiallysigned { background: var(--info-soft); color: #075985; }
.status-completed { background: var(--success-soft); color: #166534; }
.status-declined,
.status-expired { background: var(--danger-soft); color: #991b1b; }

.wizard-page-header {
    margin-bottom: 1rem;
}

.premium-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.premium-stepper button {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    gap: 0.65rem;
    min-height: 3.4rem;
    color: var(--ink);
    background: #ffffff;
    border-color: var(--line);
}

.premium-stepper button span {
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--accent-strong);
    background: #edf3ff;
}

.premium-stepper button.active {
    color: #ffffff;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.premium-stepper button.active span {
    color: var(--accent-strong);
    background: #ffffff;
}

@media (max-width: 720px) {
    .premium-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .premium-stepper button {
        min-height: 3rem;
        gap: 0.45rem;
        padding: 0.56rem;
    }

    .premium-stepper button span {
        width: 1.45rem;
        height: 1.45rem;
        font-size: 0.78rem;
    }

    .premium-stepper button strong {
        max-width: 100%;
        overflow: hidden;
        font-size: 0.78rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.wizard-card {
    width: min(100%, 980px);
    margin-inline: auto;
}

.upload-zone {
    position: relative;
    min-height: 230px;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    padding: 2rem;
    border: 1.5px dashed #b8c4d6;
    border-radius: 8px;
    background: #f8fbff;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.upload-zone::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(37, 99, 235, 0.08) 45%, transparent 75%);
    transform: translateX(-70%);
}

.upload-zone:hover {
    border-color: #7ea2ff;
    background: #f4f8ff;
    box-shadow: 0 14px 28px rgba(21, 35, 31, 0.08);
    transform: translateY(-1px);
}

.upload-zone.is-uploading {
    cursor: wait;
    border-style: solid;
    border-color: #86a7ff;
    background: #f6f9ff;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
}

.upload-zone.is-uploading::before {
    opacity: 1;
    animation: uploadSweep 1.35s ease-in-out infinite;
}

.upload-zone.is-complete {
    border-style: solid;
    border-color: #9bd4b4;
    background: #f4fbf7;
}

.upload-zone .sf-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: currentColor;
}

.upload-orb {
    width: 4rem;
    height: 4rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--accent-strong);
    background: #ffffff;
    border: 1px solid #d8e3ff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
    z-index: 1;
}

.upload-zone.is-uploading .upload-orb {
    animation: uploadPulse 1.15s ease-in-out infinite;
}

.upload-zone.is-complete .upload-orb {
    color: var(--success);
    border-color: #bfe6cf;
    box-shadow: 0 10px 24px rgba(22, 131, 74, 0.12);
}

.upload-copy {
    display: grid;
    gap: 0.35rem;
    z-index: 1;
}

.upload-copy strong {
    color: var(--ink-strong);
    font-size: 1.05rem;
}

.upload-copy small {
    color: var(--muted);
    font-weight: 650;
}

.upload-progress {
    position: relative;
    width: min(22rem, 100%);
    height: 0.45rem;
    margin-top: 0.7rem;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe6ff;
    z-index: 1;
}

.upload-progress span {
    position: absolute;
    inset-block: 0;
    width: 42%;
    border-radius: inherit;
    background: var(--accent-strong);
    animation: uploadRail 1.05s ease-in-out infinite;
}

.upload-status-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #d8e3ff;
    border-radius: 8px;
    background: #fbfdff;
    box-shadow: 0 10px 24px rgba(21, 35, 31, 0.06);
}

.upload-status-card > div {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.upload-status-card strong {
    color: var(--ink-strong);
}

.upload-status-card span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 650;
}

.upload-steps {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.upload-steps li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.upload-steps li span {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 50%;
    background: #c8d2df;
}

.upload-steps li.is-done {
    color: var(--success);
}

.upload-steps li.is-done span {
    background: var(--success);
}

.upload-steps li.is-active {
    color: var(--accent-strong);
}

.upload-steps li.is-active span {
    background: var(--accent-strong);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28);
    animation: uploadStepPulse 1.2s ease-out infinite;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-zone.is-uploading input[type="file"] {
    pointer-events: none;
    cursor: wait;
}

.upload-integrity {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #cae8d6;
    border-radius: 8px;
    background: #f6fbf8;
    color: var(--success);
}

.upload-integrity .sf-icon {
    margin-top: 0.1rem;
}

.upload-integrity div {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.upload-integrity strong {
    color: var(--ink-strong);
}

.upload-integrity code {
    max-width: 100%;
    display: block;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 0.78rem;
}

@keyframes uploadSweep {
    0% { transform: translateX(-70%); }
    100% { transform: translateX(70%); }
}

@keyframes uploadPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes uploadRail {
    0% { left: -45%; }
    100% { left: 105%; }
}

@keyframes uploadStepPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28); }
    100% { box-shadow: 0 0 0 0.55rem rgba(37, 99, 235, 0); }
}

@media (max-width: 720px) {
    .upload-status-card {
        grid-template-columns: 1fr;
    }

    .upload-steps {
        flex-wrap: wrap;
    }
}

.document-editor-shell {
    min-height: calc(100vh - 185px);
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr) 260px;
    gap: 0;
    overflow: hidden;
    border: 1px solid #d7e0dc;
    border-radius: 8px;
    background: #edf2f7;
    box-shadow: var(--shadow);
}

.editor-sidebar {
    min-height: 0;
    overflow: auto;
    padding: 1rem;
    background: #ffffff;
}

.editor-sidebar-left {
    border-right: 1px solid var(--line);
}

.editor-sidebar-right {
    border-left: 1px solid var(--line);
}

.editor-canvas-panel {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #d7e0dc;
    background: rgba(255, 255, 255, 0.96);
}

.modern-field-palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 1rem;
}

.modern-field-palette .field-chip {
    position: relative;
    min-height: 74px;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    padding: 0.72rem 0.5rem 0.62rem;
    color: var(--signer-text);
    background: #fbfcfd;
    border-color: color-mix(in srgb, var(--signer-accent) 34%, #d4dde8);
}

.modern-field-palette .field-chip:hover {
    color: var(--signer-text);
    border-color: var(--signer-accent);
    background: linear-gradient(180deg, #ffffff, var(--signer-bg));
}

.modern-field-palette .sf-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.signer-color-summary,
.field-color-line {
    --signer-accent: var(--accent);
    --signer-bg: rgba(37, 99, 235, 0.12);
    --signer-text: var(--accent-strong);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--signer-text);
    font-size: 0.78rem;
    font-weight: 800;
}

.signer-color-summary {
    margin-top: 0.65rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--signer-accent) 28%, var(--line));
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, var(--signer-bg));
}

.signer-color-summary span:last-child {
    color: var(--muted);
    font-weight: 700;
}

.signer-color-swatch {
    width: 0.8rem;
    height: 0.8rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--signer-accent);
    box-shadow: 0 0 0 3px var(--signer-bg);
}

.signer-code-badge {
    position: absolute;
    top: 0.42rem;
    right: 0.42rem;
    min-width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--signer-accent) 32%, transparent);
    border-radius: 999px;
    background: var(--signer-bg);
    color: var(--signer-text);
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 1;
}

.thumbnail-list {
    display: grid;
    gap: 0.75rem;
}

.thumbnail-card {
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    width: 100%;
    color: var(--ink);
    background: #ffffff;
    border-color: var(--line);
}

.verify-page {
    background: #f5f7fb;
}

.verify-hero {
    border-bottom: 1px solid var(--line);
}

.verify-panel {
    max-width: 980px;
    margin: 1.5rem auto 3rem;
    padding: 1.4rem;
}

.verify-status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.verify-code {
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
}

.verify-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.verify-facts div,
.hash-result {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.verify-facts dt,
.hash-result span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.verify-facts dd {
    margin: 0.25rem 0 0;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.hash-value,
.hash-result strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.verify-upload {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.verify-upload label {
    display: grid;
    gap: 0.45rem;
    max-width: 420px;
    font-weight: 800;
}

.status.success {
    color: #166534;
    background: var(--success-soft);
}

.status.danger {
    color: #991b1b;
    background: var(--danger-soft);
}

.compliance-disclaimer {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: #1e3a8a;
    font-weight: 700;
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.compliance-card {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    min-height: 260px;
}

.compliance-card .sf-icon {
    width: 1.45rem;
    height: 1.45rem;
    background: var(--accent-strong);
}

.compliance-card h2 {
    margin: 0;
}

.compliance-card p,
.compliance-card ul {
    margin: 0;
}

.compliance-card ul {
    padding-left: 1rem;
    color: var(--muted);
}

@media (max-width: 1100px) {
    .compliance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .verify-status-row,
    .verify-facts,
    .compliance-grid {
        grid-template-columns: 1fr;
    }

    .verify-status-row {
        display: grid;
    }
}

.thumbnail-card span {
    width: 96px;
    aspect-ratio: 595 / 842;
    border: 1px solid #d4dde8;
    border-radius: 6px;
    background:
        linear-gradient(#e4e9ef 0 0) 18px 20px / 60px 4px no-repeat,
        linear-gradient(#eef2f7 0 0) 18px 34px / 48px 4px no-repeat,
        linear-gradient(#eef2f7 0 0) 18px 48px / 58px 4px no-repeat,
        #ffffff;
}

@media (max-width: 980px) {
    .document-editor-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .editor-sidebar {
        overflow: visible;
    }

    .editor-sidebar-left,
    .editor-sidebar-right {
        border: 0;
        border-bottom: 1px solid var(--line);
    }

    .editor-canvas-panel {
        min-height: 72vh;
    }

    .editor-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .modern-field-palette {
        grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    }
}

.loading-mark {
    width: 3rem;
    height: 3rem;
    padding: 0.35rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
}

.loading-bar {
    width: 100%;
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.loading-bar span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: #43c78f;
    animation: loadingSweep 1.2s ease-in-out infinite;
}

@keyframes loadingSweep {
    0% {
        transform: translateX(-105%);
    }

    100% {
        transform: translateX(270%);
    }
}

@keyframes sf-sheen {
    0% {
        background-position: 220% 0;
    }

    100% {
        background-position: -220% 0;
    }
}

.toast {
    position: sticky;
    top: 4.7rem;
    z-index: var(--z-toast);
    margin: 1rem 1.25rem 0;
    border: 1px solid #f0d58a;
    border-radius: var(--radius-md);
    background: var(--warning-soft);
    color: #7a5200;
    padding: 0.8rem 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: var(--z-toast);
    display: grid;
    gap: 0.6rem;
    max-width: min(24rem, calc(100vw - 2.5rem));
}

.toast-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-weight: 650;
    box-shadow: var(--shadow-md);
    animation: toast-in 0.18s ease-out;
}

.toast-item span {
    flex: 1;
}

.toast-item.toast-error {
    border: 1px solid rgba(220, 38, 38, 0.35);
    background: var(--danger-soft, #fef2f2);
    color: #991b1b;
}

.toast-item.toast-info {
    border: 1px solid rgba(37, 99, 235, 0.3);
    background: var(--accent-soft, #eff6ff);
    color: #1d4ed8;
}

.toast-dismiss {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
}

.toast-dismiss:hover {
    opacity: 1;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signing-shell {
    min-height: 100vh;
    background: #f5f3ee;
}

.signing-page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.signing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem clamp(1rem, 4vw, 2rem);
    border-bottom: 1px solid var(--sf-border);
    background: #ffffff;
}

.signing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 1rem;
    padding: 1rem;
}

.task-panel {
    display: grid;
    align-content: start;
    gap: 1rem;
}

@media (max-width: 980px) {
    .public-nav {
        display: none;
    }

    .marketing-hero,
    .scene-grid,
    .auth-shell,
    .workspace-shell,
    .signing-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        min-height: 760px;
        align-items: end;
    }

    .hero-product-scene {
        align-content: start;
        opacity: 0.72;
    }

    .scene-document {
        min-height: 280px;
        grid-row: auto;
    }

    .workspace-sidebar {
        position: sticky;
        top: 0;
        z-index: calc(var(--z-header) + 1);
        height: auto;
        grid-template-rows: auto auto;
    }

    .workspace-brand {
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 0.65rem;
        padding: 0.8rem 0.9rem;
    }

    .workspace-switcher {
        min-width: 0;
        padding: 0.55rem 0.62rem;
    }

    .workspace-nav {
        display: flex;
        gap: 0.35rem;
        overflow-x: auto;
        padding: 0.55rem 0.75rem 0.75rem;
        scrollbar-width: thin;
    }

    .workspace-nav a {
        flex: 0 0 auto;
        gap: 0.45rem;
        padding: 0.52rem 0.62rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .workspace-user {
        display: none;
    }

    .workspace-topbar {
        grid-template-columns: 1fr;
        position: static;
        gap: 0.7rem;
        padding: 0.75rem 0.9rem;
    }

    .public-footer {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        width: 100%;
        overflow-x: hidden;
    }

    .auth-brand-panel {
        padding: 1.5rem;
        gap: 1.4rem;
    }

    .auth-brand-panel h1 {
        font-size: 1.65rem;
        line-height: 1.08;
    }

    .auth-brand-panel p {
        line-height: 1.55;
    }

    .auth-card {
        padding: 1.25rem;
    }

    .auth-form {
        width: 100%;
        padding: 1.1rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-actions {
        gap: 0.55rem;
    }

    .workspace-brand {
        grid-template-columns: 1fr;
    }

    .workspace-switcher {
        display: none;
    }

    .workspace-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .workspace-topbar .global-search {
        display: none;
    }

    .workspace-topbar .button {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .workspace-content {
        padding: 0.85rem;
    }

    .landing-hero {
        min-height: 720px;
    }

    .scene-toolbar,
    .scene-panel,
    .scene-timeline {
        display: none;
    }

    .hero-content h1 {
        font-size: clamp(3.4rem, 18vw, 5rem);
    }

    .public-actions a:not(.button) {
        display: none;
    }

    .public-footer {
        grid-template-columns: 1fr;
    }
}

/* ── Dashboard greeting ───────────────────────────────────── */
.dash-greeting {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 45%, var(--accent-soft));
    box-shadow: var(--shadow-sm);
}

.dash-greeting-text {
    display: grid;
    gap: 0.3rem;
}

.dash-greeting-text h1 {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

/* ── Dashboard metric cards ───────────────────────────────── */
.dash-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dash-metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.dash-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
    text-decoration: none;
}

.dash-metric-icon {
    width: 2.7rem;
    height: 2.7rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
}

.dash-metric-icon .sf-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.dash-metric-body strong {
    display: block;
    font-size: 1.7rem;
    font-weight: 850;
    line-height: 1;
    color: var(--ink-strong);
}

.dash-metric-body span {
    display: block;
    font-size: var(--text-meta);
    font-weight: 700;
    color: var(--muted);
    margin-top: 0.22rem;
    white-space: nowrap;
}

.dash-metric-neutral .dash-metric-icon { background: var(--neutral-100); color: var(--neutral-700); }
.dash-metric-warning .dash-metric-icon { background: var(--warning-soft); color: var(--warning); }
.dash-metric-warning .dash-metric-body strong { color: var(--warning); }
.dash-metric-success .dash-metric-icon { background: var(--success-soft); color: var(--success); }
.dash-metric-success .dash-metric-body strong { color: var(--success); }
.dash-metric-danger .dash-metric-icon { background: var(--danger-soft); color: var(--danger); }
.dash-metric-danger .dash-metric-body strong { color: var(--danger); }
.dash-metric-info .dash-metric-icon { background: var(--info-soft); color: var(--info); }
.dash-metric-info .dash-metric-body strong { color: var(--info); }

/* ── Attention banner ─────────────────────────────────────── */
.attention-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    background: var(--warning-soft);
}

.attention-banner .sf-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    color: var(--warning);
}

.attention-banner-copy {
    flex: 1;
    min-width: 0;
}

.attention-banner-copy strong {
    display: block;
    color: #7c2d12;
    font-size: var(--text-body);
}

.attention-banner-copy span {
    color: var(--warning);
    font-size: var(--text-meta);
    font-weight: 700;
}

/* ── Stepper done / locked ────────────────────────────────── */
.premium-stepper button.done {
    color: var(--success);
    background: var(--success-soft);
    border-color: #a7f3d0;
}

.premium-stepper button.done span {
    color: var(--success);
    background: rgba(22, 128, 74, 0.12);
}

.premium-stepper button:disabled:not(.active) {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Wizard continue bar ──────────────────────────────────── */
.wizard-continue-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
}

.wizard-continue-bar > div {
    min-width: 0;
}

.wizard-continue-bar strong {
    display: block;
    color: var(--accent-strong);
}

.wizard-continue-bar span {
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 700;
}

/* ── Dashboard responsive ─────────────────────────────────── */
@media (max-width: 1100px) {
    .dash-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dash-greeting {
        flex-direction: column;
        gap: 1rem;
        padding: 1.1rem 1.25rem;
    }

    .dash-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attention-banner {
        flex-wrap: wrap;
    }
}

/* ── Text button ──────────────────────────────────────────── */
.text-button {
    color: var(--ink);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.text-button:hover {
    background: var(--neutral-100);
    border-color: var(--line-strong);
    color: var(--ink-strong);
    transform: none;
    box-shadow: none;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid var(--line);
    background: var(--neutral-25);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    flex-wrap: wrap;
}

.pagination-info {
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 700;
    white-space: nowrap;
    min-width: 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    flex-wrap: wrap;
}

.pagination-controls button {
    min-height: 2rem;
    min-width: 2rem;
    padding: 0 0.55rem;
    font-size: var(--text-meta);
    font-weight: 700;
    box-shadow: none;
    line-height: 1;
}

.pagination-controls button:hover {
    transform: none;
}

.pagination-ellipsis {
    color: var(--muted);
    padding: 0 0.2rem;
    font-size: var(--text-meta);
    line-height: 2rem;
    user-select: none;
}

.pagination-select {
    width: auto;
    min-width: 0;
    min-height: 2rem;
    padding: 0.28rem 0.65rem;
    font-size: var(--text-meta);
}

/* ── Metric strip responsive ──────────────────────────────── */
@media (max-width: 960px) {
    .metric-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .metric-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .pagination-controls {
        gap: 0.22rem;
    }
}

/* ── Audit / activity timeline ───────────────────────────── */
.timeline {
    padding: 0.25rem 0;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
}

.timeline-dot {
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--neutral-100);
    color: var(--muted);
    flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 0 0 3px #ffffff;
}

.timeline-dot .sf-icon {
    width: 0.9rem;
    height: 0.9rem;
}

.timeline-connector {
    flex: 1;
    width: 2px;
    min-height: 0.55rem;
    background: var(--line);
    margin: 0.3rem 0;
}

.timeline-body {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
    padding-top: 0.32rem;
}

.timeline-meta {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.timeline-event {
    font-size: 0.9rem;
    font-weight: 750;
    color: var(--ink-strong);
}

.timeline-when {
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 700;
}

.timeline-desc {
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 650;
    overflow-wrap: anywhere;
}

.timeline-ip {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.7rem;
    color: var(--muted);
}

.tl-created { background: var(--info-soft); color: var(--info); }
.tl-sent { background: var(--accent-soft); color: var(--accent-strong); }
.tl-signed { background: var(--success-soft); color: var(--success); }
.tl-completed { background: var(--success-soft); color: var(--success); }
.tl-declined,
.tl-cancelled { background: var(--danger-soft); color: var(--danger); }
.tl-viewed { background: var(--neutral-100); color: var(--neutral-700); }
.tl-upload { background: var(--info-soft); color: var(--info); }

/* ── Extra status colors ─────────────────────────────────── */
.status-signed { background: var(--success-soft); color: #166534; }
.status-pending,
.status-notyetsent { background: var(--neutral-100); color: var(--neutral-700); }

/* ── Verification certificate card ──────────────────────── */
.cert-shell {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 2rem 1rem;
    background: #f0f4f8;
}

.cert-card {
    width: min(820px, 100%);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.cert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #12231e 0%, #1a3028 100%);
    color: #ffffff;
}

.cert-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 850;
    color: #ffffff;
}

.cert-logo .sf-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.cert-verified-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(67, 199, 143, 0.45);
    border-radius: 999px;
    background: rgba(67, 199, 143, 0.14);
    color: #43c78f;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.cert-verified-badge .sf-icon {
    width: 0.88rem;
    height: 0.88rem;
}

.cert-invalid-badge {
    border-color: rgba(244, 100, 88, 0.45);
    background: rgba(244, 100, 88, 0.14);
    color: #f46458;
}

.cert-body {
    padding: 2rem;
}

.cert-status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.cert-status-row > div {
    display: grid;
    gap: 0.4rem;
}

.cert-status-row h2 {
    font-size: 1.3rem;
    font-weight: 850;
    color: var(--ink-strong);
}

.cert-code-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--neutral-50);
    letter-spacing: 0.04em;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: flex-start;
    margin-top: 0.3rem;
}

.cert-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.cert-fact {
    padding: 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--neutral-25);
}

.cert-fact dt {
    color: var(--muted);
    font-size: var(--text-caption);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.cert-fact dd {
    color: var(--ink-strong);
    font-weight: 720;
    margin: 0;
    overflow-wrap: anywhere;
}

.cert-hash-block {
    padding: 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--neutral-25);
    margin-bottom: 1.5rem;
}

.cert-hash-block dt {
    color: var(--muted);
    font-size: var(--text-caption);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.cert-hash-block dd {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    color: var(--ink);
    overflow-wrap: anywhere;
    margin: 0;
}

.cert-compare-zone {
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--neutral-25);
}

.cert-compare-zone h3 {
    color: var(--ink-strong);
    font-size: 1rem;
    font-weight: 750;
    margin-bottom: 0.3rem;
}

.cert-compare-zone p {
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 650;
    margin-bottom: 1rem;
}

.cert-compare-result {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #ffffff;
}

.cert-compare-result dt {
    color: var(--muted);
    font-size: var(--text-caption);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.cert-compare-result dd {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--ink);
}

.cert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 1px solid var(--line);
    background: var(--neutral-25);
    flex-wrap: wrap;
}

.cert-footer span {
    color: var(--muted);
    font-size: var(--text-meta);
    font-weight: 700;
}

@media (max-width: 640px) {
    .cert-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1.1rem 1.25rem;
    }

    .cert-body {
        padding: 1.25rem;
    }

    .cert-facts {
        grid-template-columns: 1fr;
    }

    .cert-footer {
        padding: 0.85rem 1.25rem;
    }
}

/* ── Signing field prompt (click-to-sign icon) ───────────── */
.signing-field-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: inherit;
}

.signing-field-prompt .sf-icon {
    width: 1rem;
    height: 1rem;
}

.signing-field-prompt span:last-child {
    font-size: 0.58rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signing-field-empty-label {
    position: absolute;
    inset: 0.15rem 0.35rem auto;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    color: var(--sw-primary);
    font-size: 0.55rem;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signing-field:has(.signing-field-empty-label) select {
    padding-top: 0.8rem;
}

/* ── Signing task panel ────────────────────────────────────── */
.signing-task-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.signing-task-header .sf-icon {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--accent-strong);
    flex: 0 0 auto;
}

.signing-task-header h2 {
    font-size: 1rem;
    margin: 0;
}

.signing-progress-track {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--neutral-25);
    margin-bottom: 0.85rem;
}

.signing-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.signing-progress-row span {
    font-size: var(--text-meta);
    font-weight: 700;
    color: var(--muted);
}

.signing-progress-row strong {
    font-size: var(--text-meta);
    color: var(--ink-strong);
}

.signing-progress-bar {
    height: 0.35rem;
    border-radius: 999px;
    background: var(--neutral-200);
    overflow: hidden;
}

.signing-progress-bar > div {
    height: 100%;
    border-radius: inherit;
    background: var(--accent-strong);
    transition: width 0.35s ease;
}

.signing-progress-bar.complete > div {
    background: var(--success);
}

.signing-applied-badge {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    background: var(--success-soft);
    color: var(--success);
    font-size: var(--text-meta);
    font-weight: 750;
    margin-bottom: 0.75rem;
}

.signing-applied-badge .sf-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.signing-sign-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.5rem;
    margin-bottom: 0.75rem;
    background: var(--accent-soft);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-md);
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow: none;
    transition: background var(--transition-fast);
}

.signing-sign-cta:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    box-shadow: none;
    transform: none;
}

.signing-sign-cta .sf-icon {
    width: 1rem;
    height: 1rem;
}

.signing-agree-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--neutral-25);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.55;
    color: var(--ink);
    margin: 0.7rem 0;
}

.signing-agree-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

.signing-complete-btn {
    width: 100%;
    min-height: 2.9rem;
    font-size: 0.95rem;
    justify-content: center;
    background: var(--success);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.22);
}

.signing-complete-btn:hover:not(:disabled) {
    background: #13693a;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(21, 128, 61, 0.32);
}

.signing-complete-btn:disabled {
    opacity: 0.55;
}

.signing-otp-card {
    padding: 0.9rem 1rem;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    background: var(--warning-soft);
    margin-bottom: 0.85rem;
}

/* ── Signature capture mode tabs ─────────────────────────── */
.sig-mode-tabs {
    display: flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.1rem;
}

.sig-mode-tab {
    flex: 1;
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 750;
    border: none;
    border-right: 1px solid var(--line);
    background: var(--neutral-50);
    color: var(--muted);
    cursor: pointer;
    min-height: unset;
    box-shadow: none;
    border-radius: 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sig-mode-tab:last-child {
    border-right: none;
}

.sig-mode-tab.active {
    background: #ffffff;
    color: var(--accent-strong);
    box-shadow: inset 0 -2px 0 var(--accent-strong);
}

.sig-mode-tab:hover:not(.active) {
    background: var(--neutral-100);
    color: var(--ink);
    transform: none;
    box-shadow: none;
}

/* ── SignWorkspace design system enforcement ──────────────── */
.button:active,
button:active {
    background: var(--sw-primary-active);
    border-color: var(--sw-primary-active);
    transform: translateY(0);
}

.text-button,
.public-actions a:not(.button),
.hero-secondary {
    box-shadow: none;
}

.workspace-shell,
.workspace-content,
.signing-shell,
.signing-page {
    background: var(--sw-bg);
}

.workspace-shell {
    grid-template-columns: var(--sw-sidebar-width) minmax(0, 1fr);
}

.workspace-sidebar {
    background: var(--sw-sidebar);
}

.workspace-brand {
    border-bottom-color: rgba(226, 232, 240, 0.12);
}

.workspace-switcher {
    border-color: rgba(226, 232, 240, 0.14);
    border-radius: var(--sw-radius-md);
    background: rgba(248, 250, 252, 0.06);
}

.workspace-switcher:hover {
    background: var(--sw-sidebar-hover);
}

.workspace-nav a {
    color: #CBD5E1;
    border-radius: var(--sw-radius-md);
}

.workspace-nav a .sf-icon {
    color: #94A3B8;
}

.workspace-nav a:hover {
    background: var(--sw-sidebar-hover);
    color: var(--sw-text-inverse);
}

.workspace-nav a.active {
    color: var(--sw-text-inverse);
    background: var(--sw-sidebar-active);
}

.workspace-nav a.active::before {
    background: var(--sw-teal);
}

.workspace-nav a.active .sf-icon {
    color: var(--sw-teal);
}

.workspace-user {
    border-top-color: rgba(226, 232, 240, 0.12);
}

.workspace-user span,
.workspace-brand span {
    color: #94A3B8;
}

.avatar {
    background: var(--sw-primary-soft);
    color: var(--sw-primary-active);
}

.workspace-topbar {
    min-height: var(--sw-topbar-height);
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--sw-border);
    box-shadow: var(--sw-shadow-xs);
}

.breadcrumbs,
.global-search .sf-icon {
    color: var(--sw-text-muted);
}

.global-search input {
    background: var(--sw-surface-subtle);
    border-color: var(--sw-border);
}

.premium-panel,
.table-panel,
.document-control-panel,
.contact-control-panel,
.editor-canvas-panel,
.verify-panel,
.task-panel,
.signing-document-panel,
.signing-task-panel,
.cert-card,
.auth-form,
.panel {
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-lg);
    background: var(--sw-surface);
    box-shadow: var(--sw-shadow-sm);
}

.data-table,
table {
    border-color: var(--sw-border);
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow-xs);
}

.data-table th,
th {
    background: var(--sw-surface-muted);
    color: var(--sw-text-muted);
}

.data-table tbody tr:hover,
tbody tr:hover {
    background: var(--sw-surface-subtle);
}

.status-draft,
.status-notyetsent,
.status-pending,
.status-inactive {
    background: var(--sw-surface-muted);
    color: var(--sw-text-secondary);
}

.status-sent,
.status-awaitingsignature,
.status-partiallysigned,
.status-inprogress {
    background: var(--sw-info-soft);
    color: #075985;
}

.status-viewed {
    background: #E6F8FC;
    color: #0E7490;
}

.status-completed,
.status-signed,
.status-active,
.status.success {
    background: var(--sw-success-soft);
    color: #166534;
}

.status-expiring {
    background: var(--sw-warning-soft);
    color: #92400E;
}

.status-declined,
.status-cancelled,
.status-canceled,
.status-expired,
.status.danger {
    background: var(--sw-danger-soft);
    color: #991B1B;
}

.premium-metric,
.dash-metric,
.metric {
    border: 0;
    border-radius: var(--sw-radius-lg);
    background: var(--sw-surface-muted);
    box-shadow: none;
}

.dash-metric-icon,
.feature-icon,
.doc-thumb {
    border-color: transparent;
    border-radius: var(--sw-radius-md);
    background: var(--sw-primary-soft);
    color: var(--sw-primary);
}

.dash-metric-success .dash-metric-icon {
    background: var(--sw-teal-soft);
    color: var(--sw-teal-hover);
}

.dash-metric-warning .dash-metric-icon {
    background: var(--sw-warning-soft);
    color: var(--sw-warning);
}

.public-site {
    background: var(--sw-bg);
}

.public-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: var(--sw-border);
    box-shadow: var(--sw-shadow-xs);
}

.public-logo,
.public-nav a,
.public-actions a:not(.button) {
    color: var(--sw-text-primary);
}

.public-nav .sf-icon {
    color: var(--sw-text-muted);
}

.public-actions .button,
.landing-hero .button:not(.secondary):not(.hero-secondary),
.hero-actions .button:first-child {
    background: var(--sw-gradient);
    border-color: transparent;
}

.landing-hero {
    color: var(--sw-text-inverse);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.92)),
        var(--sw-primary-dark);
}

.landing-hero::after {
    background: rgba(15, 23, 42, 0.9);
}

.hero-product-scene {
    opacity: 0.78;
}

.landing-hero .eyebrow,
.hero-proof span,
.scene-timeline span {
    color: #B8FFF6;
    border-color: var(--sw-teal);
}

.scene-document,
.scene-panel,
.scene-timeline {
    border-radius: var(--sw-radius-lg);
}

.signature-field {
    border-color: var(--sw-primary);
    background: var(--sw-primary-soft);
    color: var(--sw-primary-active);
}

.signature-field.accent,
.scene-progress span {
    border-color: var(--sw-teal);
    background: var(--sw-teal-soft);
    color: #0F766E;
}

.marketing-section {
    background: var(--sw-bg);
}

.marketing-section:nth-of-type(even) {
    background: var(--sw-surface);
}

.feature-card,
.solution-card,
.pricing-card,
.template-preview,
.trust-strip span {
    border-color: var(--sw-border);
    border-radius: var(--sw-radius-lg);
    background: var(--sw-surface);
    box-shadow: var(--sw-shadow-sm);
}

.feature-card::after,
.solution-card::after {
    display: none;
}

.feature-card:hover,
.solution-card:hover {
    border-color: var(--sw-border-strong);
    box-shadow: var(--sw-shadow-md);
}

.showcase-dark,
.public-footer,
.auth-brand-panel,
.product-mock {
    background: var(--sw-primary-dark);
}

.public-footer {
    border-top-color: rgba(226, 232, 240, 0.12);
    color: #CBD5E1;
}

.public-footer h2,
.public-footer strong {
    color: var(--sw-text-inverse);
}

.public-footer a {
    color: #CBD5E1;
}

.public-footer a:hover {
    color: var(--sw-teal);
}

.auth-shell {
    background: var(--sw-bg);
}

.auth-brand-panel {
    background:
        radial-gradient(circle at 15% 15%, rgba(17, 203, 190, 0.16), transparent 28%),
        radial-gradient(circle at 78% 74%, rgba(15, 151, 229, 0.18), transparent 34%),
        var(--sw-primary-dark);
}

.auth-card {
    background: var(--sw-bg);
}

.auth-form {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.premium-stepper button {
    background: var(--sw-surface);
    border-color: var(--sw-border);
    color: var(--sw-text-primary);
}

.premium-stepper button span {
    color: var(--sw-primary);
    background: var(--sw-primary-soft);
}

.premium-stepper button.active {
    background: var(--sw-primary);
    border-color: var(--sw-primary);
}

.premium-stepper button.done {
    border-color: rgba(17, 203, 190, 0.42);
    background: var(--sw-teal-soft);
    color: #0F766E;
}

.premium-stepper button.done span {
    background: var(--sw-teal);
    color: var(--sw-primary-dark);
}

.signing-header {
    background: var(--sw-surface);
    border-color: var(--sw-border);
    box-shadow: var(--sw-shadow-xs);
}

.signing-field,
.signing-field-signature {
    border-color: var(--sw-border-strong);
    background: rgba(255, 255, 255, 0.88);
    color: var(--sw-text-primary);
}

.signing-field.missing {
    border-color: var(--sw-warning);
    background: var(--sw-warning-soft);
}

.signing-field.is-filled,
.signing-field-signature.is-filled {
    border-color: transparent;
    background: transparent;
}

.signing-complete-btn {
    background: var(--sw-primary);
    box-shadow: 0 8px 18px rgba(15, 151, 229, 0.18);
}

.signing-complete-btn:hover:not(:disabled) {
    background: var(--sw-primary-hover);
    box-shadow: 0 10px 24px rgba(15, 151, 229, 0.24);
}

.signing-applied-badge {
    border-color: rgba(17, 203, 190, 0.34);
    background: var(--sw-teal-soft);
    color: #0F766E;
}

.sig-mode-tabs {
    border-color: var(--sw-border);
}

.sig-mode-tab {
    background: var(--sw-surface-muted);
    color: var(--sw-text-muted);
    border-color: var(--sw-border);
}

.sig-mode-tab.active {
    background: var(--sw-surface);
    color: var(--sw-primary);
    box-shadow: inset 0 -2px 0 var(--sw-primary);
}

/* ── Row action dropdown menu ────────────────────────────── */
.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}

.row-menu-anchor {
    position: relative;
}

.row-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 100;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.3rem;
    min-width: 188px;
}

.row-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    box-shadow: none;
    min-height: unset;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.row-menu-item .sf-icon {
    width: 0.88rem;
    height: 0.88rem;
    flex: 0 0 auto;
    color: var(--muted);
}

.row-menu-item:hover {
    background: var(--neutral-100);
    color: var(--ink-strong);
    transform: none;
    box-shadow: none;
}

.row-menu-item.danger { color: var(--danger); }
.row-menu-item.danger .sf-icon { color: var(--danger); }
.row-menu-item.danger:hover { background: var(--danger-soft); color: var(--danger); }

.row-menu-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 0.25rem 0.3rem;
}

/* Billing, pricing and checkout */
.pricing-hero,
.checkout-section {
    background: var(--sw-bg);
}

.pricing-heading {
    align-items: flex-end;
    gap: 1rem;
}

.billing-toggle-group {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: var(--sw-radius-md);
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    box-shadow: var(--sw-shadow-xs);
}

.billing-toggle-group button {
    border: 0;
    border-radius: var(--sw-radius-sm);
    background: transparent;
    color: var(--sw-text-muted);
    font-weight: 800;
    padding: 0.58rem 0.82rem;
    min-height: 2.35rem;
    box-shadow: none;
}

.billing-toggle-group button.active {
    background: var(--sw-primary-soft);
    color: var(--sw-primary);
}

.billing-pricing-grid {
    align-items: stretch;
}

.billing-plan-card {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    min-height: 100%;
}

.billing-plan-card.is-featured {
    border-color: rgba(15, 151, 229, 0.34);
    box-shadow: 0 20px 48px rgba(15, 151, 229, 0.14);
}

.billing-plan-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.billing-plan-topline > .sf-icon,
.checkout-icon {
    width: 2.45rem;
    height: 2.45rem;
    display: inline-grid;
    place-items: center;
    border-radius: var(--sw-radius-md);
    color: var(--sw-primary);
    background: var(--sw-primary-soft);
}

.checkout-icon.success {
    color: var(--success);
    background: var(--success-soft);
}

.checkout-icon.warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.billing-price {
    display: grid;
    gap: 0.4rem;
    min-height: 4.75rem;
    align-content: end;
}

.billing-price-amount {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.billing-price-currency {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--sw-text-muted);
}

.billing-price-amount strong {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--sw-text-primary);
}

.billing-price-interval {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 1.55rem;
    padding: 0.18rem 0.62rem;
    border-radius: 999px;
    background: var(--sw-primary-soft);
    color: var(--sw-primary);
    font-size: var(--text-meta);
    font-weight: 800;
}

.billing-feature-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--sw-text-secondary);
}

.billing-feature-list li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.billing-feature-list li::before {
    content: "";
    width: 0.58rem;
    height: 0.58rem;
    margin-top: 0.38rem;
    border-radius: 999px;
    background: var(--sw-teal);
    flex: 0 0 auto;
}

.billing-addon-strip {
    margin-top: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: var(--sw-radius-lg);
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
}

.billing-addon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.billing-addon-list.vertical {
    display: grid;
}

.billing-addon-list span,
.billing-addon-row {
    border-radius: var(--sw-radius-sm);
    background: var(--sw-surface-muted);
    padding: 0.7rem 0.8rem;
    color: var(--sw-text-secondary);
}

.billing-page-header {
    align-items: flex-end;
}

.billing-overview-grid,
.billing-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.billing-current-card,
.billing-usage-card,
.billing-actions-panel {
    display: grid;
    gap: 1rem;
}

.billing-usage-row,
.billing-plan-row,
.billing-addon-row,
.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.billing-plan-row,
.billing-addon-row {
    padding: 0.9rem;
    border-radius: var(--sw-radius-md);
    border: 1px solid var(--sw-border);
    background: var(--sw-surface-muted);
}

.billing-plan-row > div,
.billing-addon-row > div {
    display: grid;
    gap: 0.2rem;
}

.billing-plan-row span,
.billing-addon-row span {
    color: var(--sw-text-muted);
    font-size: var(--text-meta);
}

.billing-plan-list,
.billing-table {
    display: grid;
    gap: 0.7rem;
}

.billing-progress {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--neutral-100);
}

.billing-progress span {
    display: block;
    height: 100%;
    min-width: 0.35rem;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sw-primary), var(--sw-teal));
}

.billing-alert {
    border-radius: var(--sw-radius-md);
    padding: 0.85rem 1rem;
    font-weight: 750;
}

.billing-alert-warning {
    background: var(--warning-soft);
    color: #92400E;
}

.billing-alert-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.billing-loading-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--sw-radius-lg);
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    color: var(--sw-text-secondary);
    box-shadow: var(--sw-shadow-xs);
}

.support-mode-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 1rem 0;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--sw-radius-lg);
    background: var(--sw-warning-soft);
    color: #92400E;
    box-shadow: var(--sw-shadow-xs);
}

.support-mode-banner strong {
    color: #78350F;
}

.support-mode-banner span:last-child {
    margin-left: auto;
    color: var(--sw-text-muted);
    font-size: var(--text-caption);
    font-weight: 800;
}

.billing-loading-panel.compact {
    border-radius: var(--sw-radius-md);
}

.loading-spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid var(--sw-border-strong);
    border-top-color: var(--sw-primary);
    animation: spin 0.72s linear infinite;
    flex: 0 0 auto;
}

.billing-inline-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sw-text-muted);
    font-size: var(--text-meta);
    font-weight: 800;
}

.billing-table > div {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--sw-border);
}

.billing-table > div:last-child {
    border-bottom: 0;
}

.checkout-section {
    min-height: 72vh;
    display: grid;
    place-items: center;
}

.checkout-card {
    width: min(100%, 34rem);
    display: grid;
    gap: 0.9rem;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border-radius: var(--sw-radius-lg);
    background: var(--sw-surface);
    border: 1px solid var(--sw-border);
    box-shadow: var(--sw-shadow-md);
}

.checkout-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 860px) {
    .pricing-heading,
    .billing-page-header,
    .billing-addon-strip,
    .billing-usage-row,
    .billing-plan-row,
    .billing-addon-row,
    .panel-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-overview-grid,
    .billing-columns {
        grid-template-columns: 1fr;
    }

    .billing-toggle-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .billing-toggle-group button {
        flex: 1 1 44%;
    }

    .billing-table > div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .auth-brand-panel {
        width: 100vw;
        max-width: 100vw;
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .auth-brand-panel h1 {
        width: min(100%, 20rem);
        max-width: 20rem;
        font-size: 1.5rem;
        line-height: 1.12;
        text-wrap: balance;
    }

    .auth-brand-panel p {
        width: min(100%, 20rem);
        max-width: 20rem;
        overflow-wrap: normal;
    }

    .auth-form-header p {
        width: 100%;
        max-width: 100%;
        overflow-wrap: normal;
    }

    .auth-card {
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        padding: 1rem;
    }

    .auth-form {
        width: 100%;
        max-width: calc(100vw - 2rem);
        min-width: 0;
        padding: 1rem;
    }

    .password-row {
        grid-template-columns: 1fr;
    }

    .password-row button {
        width: 100%;
        min-width: 3.6rem;
        padding-inline: 0.7rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
