.edocs-shell {
    --edocs-ink: #0b2348;
    --edocs-blue: #0769e8;
    --edocs-blue-soft: #edf5ff;
    --edocs-orange: #f6a000;
    --edocs-green: #087c57;
    --edocs-red: #b42318;
    --edocs-border: #cfdced;
    --edocs-muted: #5d6e86;
    width: min(100% - 32px, 1460px);
    margin: 0 auto;
    padding: 34px 0 54px;
    color: var(--edocs-ink);
}

.edocs-shell * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.edocs-shell-form {
    width: min(100% - 32px, 1320px);
}

.edocs-shell-narrow {
    width: min(100% - 32px, 980px);
}

.edocs-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--edocs-border);
}

.edocs-page-head h1 {
    margin: 3px 0 6px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    color: var(--edocs-ink);
}

.edocs-page-head p {
    max-width: 850px;
    margin: 0;
    color: var(--edocs-muted);
    line-height: 1.55;
}

.edocs-page-head-document h1 {
    font-size: clamp(26px, 3.2vw, 38px);
}

.edocs-eyebrow {
    margin: 0;
    color: var(--edocs-blue) !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.edocs-head-actions,
.edocs-command-bar,
.edocs-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.edocs-button,
.edocs-icon-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid #b8cbe3;
    border-radius: 8px;
    background: #fff;
    color: #075fcf;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.edocs-button:hover,
.edocs-icon-link:hover {
    border-color: var(--edocs-blue);
    background: var(--edocs-blue-soft);
}

.edocs-button:focus-visible,
.edocs-icon-link:focus-visible,
.edocs-shell input:focus-visible,
.edocs-shell select:focus-visible,
.edocs-shell textarea:focus-visible,
.edocs-shell summary:focus-visible {
    outline: 3px solid rgba(7, 105, 232, .22);
    outline-offset: 2px;
}

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

.edocs-button-primary:hover {
    background: #0459c7;
    color: #fff;
}

.edocs-button-small {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 13px;
}

.edocs-button[disabled] {
    opacity: .55;
    cursor: wait;
}

.edocs-toolbar {
    display: flex;
    gap: 14px;
    align-items: end;
    margin: 22px 0 14px;
}

.edocs-field {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--edocs-ink);
    font-weight: 700;
}

.edocs-field > span {
    font-size: 13px;
}

.edocs-field-grow {
    flex: 1;
}

.edocs-field input,
.edocs-field select,
.edocs-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #bacbe0;
    border-radius: 7px;
    background: #fff;
    color: #102b53;
    padding: 10px 12px;
    font: inherit;
    font-weight: 500;
}

.edocs-field textarea {
    resize: vertical;
}

.edocs-field input[readonly] {
    background: #f3f7fc;
    color: #445a75;
}

.edocs-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--edocs-border);
    border-radius: 8px;
    background: #fff;
}

.edocs-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.edocs-table th,
.edocs-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e4ebf4;
    text-align: left;
    vertical-align: middle;
}

.edocs-table th {
    background: #f1f6fc;
    color: #274467;
    font-size: 12px;
    text-transform: uppercase;
}

.edocs-table tbody tr:last-child td {
    border-bottom: 0;
}

.edocs-table td strong,
.edocs-table td small {
    display: block;
}

.edocs-table td small {
    margin-top: 3px;
    color: var(--edocs-muted);
    font-size: 12px;
}

.edocs-table-compact {
    min-width: 720px;
}

.edocs-table-compact th,
.edocs-table-compact td {
    padding: 11px 12px;
}

.edocs-icon-link {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 13px;
}

.edocs-status {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #b8cbe3;
    border-radius: 999px;
    background: #f2f7fd;
    color: #26476e;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.edocs-status-ready,
.edocs-status-issued {
    border-color: #9ac3f6;
    background: #e9f3ff;
    color: #075fcf;
}

.edocs-status-in_transit {
    border-color: #f8c76a;
    background: #fff6df;
    color: #875400;
}

.edocs-status-delivered,
.edocs-status-completed {
    border-color: #85d8bb;
    background: #e9f9f2;
    color: var(--edocs-green);
}

.edocs-status-cancelled,
.edocs-status-void {
    border-color: #f0aaa4;
    background: #fff0ef;
    color: var(--edocs-red);
}

.edocs-alert {
    margin: 18px 0;
    padding: 13px 15px;
    border: 1px solid #f0aaa4;
    border-radius: 7px;
    background: #fff4f2;
    color: #84241c;
    line-height: 1.45;
}

.edocs-alert-success {
    border-color: #85d8bb;
    background: #ecfaf4;
    color: #076647;
}

.edocs-form {
    display: grid;
    gap: 18px;
    padding-top: 22px;
}

.edocs-section {
    padding: 22px 0 4px;
    border-top: 1px solid var(--edocs-border);
}

.edocs-form > .edocs-section:first-child {
    border-top: 0;
    padding-top: 0;
}

.edocs-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.edocs-section-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edocs-section-head > div > span {
    color: var(--edocs-orange);
    font-size: 13px;
    font-weight: 900;
}

.edocs-section-head h2,
.edocs-side-section h2 {
    margin: 0;
    color: var(--edocs-ink);
    font-size: 20px;
}

.edocs-section-head p {
    margin: 0;
    color: var(--edocs-muted);
    font-size: 13px;
}

.edocs-preview-section {
    padding-bottom: 22px;
}

.edocs-preview-frame {
    display: block;
    width: 100%;
    min-height: 760px;
    aspect-ratio: 210 / 297;
    border: 1px solid var(--edocs-border);
    border-radius: 8px;
    background: #e8eef6;
}

.edocs-grid {
    display: grid;
    gap: 14px;
}

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

.edocs-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edocs-field-span-2 {
    grid-column: span 2;
}

.edocs-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 44px;
    padding: 10px 0;
    color: #243f61;
    font-size: 13px;
    font-weight: 700;
}

.edocs-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--edocs-blue);
}

.edocs-repeater {
    display: grid;
    gap: 12px;
}

.edocs-repeat-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 48px 16px 16px;
    border: 1px solid var(--edocs-border);
    border-radius: 8px;
    background: #fbfdff;
}

.edocs-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border: 1px solid #ecc0bc;
    border-radius: 6px;
    background: #fff;
    color: transparent;
    cursor: pointer;
}

.edocs-remove::before,
.edocs-remove::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 7px;
    width: 14px;
    height: 2px;
    background: var(--edocs-red);
}

.edocs-remove::before {
    transform: rotate(45deg);
}

.edocs-remove::after {
    transform: rotate(-45deg);
}

.edocs-form-actions {
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--edocs-border);
}

.edocs-form-actions p {
    max-width: 700px;
    margin: 0;
    color: var(--edocs-muted);
    font-size: 13px;
}

.edocs-summary {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    margin: 20px 0;
    border: 1px solid var(--edocs-border);
    border-radius: 8px;
    background: #fff;
}

.edocs-summary > div {
    min-width: 0;
    padding: 14px 16px;
    border-right: 1px solid #e0e8f2;
}

.edocs-summary > div:last-child {
    border-right: 0;
}

.edocs-summary span,
.edocs-summary strong {
    display: block;
}

.edocs-summary span {
    color: var(--edocs-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.edocs-summary strong {
    overflow: hidden;
    margin-top: 5px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.edocs-command-bar {
    margin: 0 0 20px;
    padding: 12px;
    border-left: 4px solid var(--edocs-orange);
    background: #fffaf0;
}

.edocs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.edocs-main-column,
.edocs-side-column {
    min-width: 0;
}

.edocs-side-column {
    display: grid;
    gap: 14px;
}

.edocs-side-section {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--edocs-border);
    border-radius: 8px;
    background: #fff;
}

.edocs-side-section h2,
.edocs-side-section summary {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 800;
}

.edocs-side-section summary {
    cursor: pointer;
}

.edocs-definition {
    display: grid;
    gap: 10px;
    margin: 0;
}

.edocs-definition > div {
    min-width: 0;
}

.edocs-definition dt {
    color: var(--edocs-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.edocs-definition dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.edocs-definition code {
    color: #2b4d73;
    font-size: 11px;
}

.edocs-route {
    display: grid;
    gap: 10px;
}

.edocs-route article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e0e8f2;
}

.edocs-route article:last-child {
    border-bottom: 0;
}

.edocs-route article > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--edocs-blue);
    color: #fff;
    font-weight: 900;
}

.edocs-route p,
.edocs-route small {
    margin: 4px 0 0;
    color: var(--edocs-muted);
}

.edocs-signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.edocs-signature {
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--edocs-border);
    border-radius: 8px;
    background: #fff;
}

.edocs-signature span,
.edocs-signature strong,
.edocs-signature small {
    display: block;
}

.edocs-signature > div > span,
.edocs-signature small {
    color: var(--edocs-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.edocs-signature-done {
    border-color: #85d8bb;
    background: #f2fbf7;
}

.edocs-checkmark {
    color: var(--edocs-green);
    font-size: 12px;
    font-weight: 900;
}

.edocs-timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.edocs-timeline li {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e1e9f3;
}

.edocs-timeline time,
.edocs-timeline small {
    color: var(--edocs-muted);
    font-size: 12px;
}

.edocs-timeline strong,
.edocs-timeline small {
    display: block;
}

.edocs-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #e0e8f2;
    color: #075fcf;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.edocs-file small {
    color: var(--edocs-muted);
    font-weight: 600;
}

.edocs-mini-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.edocs-check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    color: #294665;
    font-size: 12px;
}

.edocs-token-result {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.edocs-token-result input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #9fb7d3;
    border-radius: 6px;
    padding: 8px;
    font: inherit;
    font-size: 12px;
}

.edocs-token-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.edocs-token-list > div {
    position: relative;
    min-height: 48px;
    padding: 8px 46px 8px 0;
    border-top: 1px solid #e0e8f2;
}

.edocs-token-list p,
.edocs-token-list strong,
.edocs-token-list small {
    display: block;
    margin: 0;
}

.edocs-token-list small {
    margin-top: 3px;
    color: var(--edocs-muted);
    font-size: 11px;
}

.edocs-sign-form {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.edocs-canvas-wrap {
    display: grid;
    justify-items: start;
    gap: 8px;
}

.edocs-canvas-wrap canvas {
    width: 100%;
    max-width: 760px;
    aspect-ratio: 38 / 11;
    border: 1px solid #9fb7d3;
    border-radius: 7px;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
}

.edocs-consent {
    padding: 14px;
    border: 1px solid #bfd1e6;
    border-radius: 7px;
    background: #f6f9fd;
}

.edocs-verification {
    margin-top: 32px;
    padding: 34px;
    border: 1px solid #85d8bb;
    border-radius: 8px;
    background: #f5fcf9;
}

.edocs-verification h1 {
    margin: 5px 0 8px;
    font-size: 36px;
}

.edocs-verification > p:not(.edocs-eyebrow) {
    color: var(--edocs-muted);
}

.edocs-verification-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--edocs-green);
    color: #fff;
    font-weight: 900;
}

.edocs-empty,
.edocs-muted {
    color: var(--edocs-muted);
}

.edocs-empty {
    padding: 28px;
    text-align: center;
}

.edocs-hidden {
    display: none !important;
}

.edocs-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1050px) {
    .edocs-layout {
        grid-template-columns: 1fr;
    }

    .edocs-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edocs-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .edocs-summary > div {
        border-bottom: 1px solid #e0e8f2;
    }
}

@media (max-width: 760px) {
    .edocs-shell,
    .edocs-shell-form,
    .edocs-shell-narrow {
        width: min(100% - 20px, 100%);
        padding-top: 22px;
    }

    .edocs-page-head,
    .edocs-section-head,
    .edocs-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .edocs-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .edocs-grid-2,
    .edocs-grid-3,
    .edocs-repeat-row,
    .edocs-signature-grid,
    .edocs-side-column {
        grid-template-columns: 1fr;
    }

    .edocs-field-span-2 {
        grid-column: auto;
    }

    .edocs-summary {
        grid-template-columns: 1fr 1fr;
    }

    .edocs-timeline li {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .edocs-preview-frame {
        min-height: 620px;
    }
}

@media (max-width: 460px) {
    .edocs-summary {
        grid-template-columns: 1fr;
    }

    .edocs-summary > div {
        border-right: 0;
    }

    .edocs-verification {
        padding: 22px;
    }
}
