.doc-create {
    max-width: 1180px;
    margin: 0 auto;
}

.doc-create-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
}

.doc-create-top h1 {
    margin-bottom: 0;
}

.doc-kicker {
    margin: 0 0 4px;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.doc-create-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.doc-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.doc-create-main {
    display: grid;
    gap: 16px;
}

.doc-create-side {
    position: sticky;
    top: 82px;
}

.doc-panel {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.doc-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.doc-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
}

.doc-panel h2 {
    margin: 0;
    font-size: 18px;
}

.doc-panel-subtitle {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 13px;
}

.doc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.doc-link-grid {
    margin-top: 14px;
}

.doc-field {
    min-width: 0;
}

.doc-field.full {
    grid-column: 1 / -1;
}

.doc-field small,
.doc-help {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.doc-create label {
    margin-top: 0;
}

.doc-create input,
.doc-create select,
.doc-create textarea {
    border-color: #cfd8e3;
}

.doc-create textarea {
    min-height: 118px;
}

.doc-summary {
    display: grid;
    gap: 14px;
}

.doc-summary h2 {
    font-size: 16px;
}

.doc-summary-number {
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.doc-summary-number strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.doc-summary-list {
    margin: 0;
    display: grid;
    gap: 9px;
}

.doc-summary-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 8px;
}

.doc-summary-list dt {
    color: #64748b;
}

.doc-summary-list dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
}

.doc-submit-row {
    display: grid;
    gap: 8px;
}

.doc-submit-row .btn {
    text-align: center;
}

.doc-preview-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.doc-preview-table th,
.doc-preview-table td {
    border-bottom: 1px solid #e8edf5;
    padding: 9px 10px;
    vertical-align: top;
}

.doc-preview-table th {
    background: #172033;
    color: #ffffff;
    font-size: 12px;
    text-align: left;
}

.doc-preview-table th:first-child {
    width: 38%;
}

.doc-preview-table th:not(:first-child),
.doc-preview-table td:not(:first-child) {
    text-align: right;
    white-space: nowrap;
}

.doc-totals {
    max-width: 360px;
    margin: 14px 0 0 auto;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fbfcfe;
}

.doc-total-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid #e8edf5;
}

.doc-total-row:last-child {
    border-bottom: 0;
    background: #eef2f7;
    font-size: 16px;
    font-weight: 800;
}

.doc-empty {
    margin: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    color: #64748b;
    background: #f8fafc;
}

@media (max-width: 980px) {
    .doc-create-grid {
        grid-template-columns: 1fr;
    }

    .doc-create-side {
        position: static;
    }
}

@media (max-width: 720px) {
    .doc-create-top {
        display: grid;
        align-items: start;
    }

    .doc-create-actions {
        justify-content: flex-start;
    }

    .doc-form-grid {
        grid-template-columns: 1fr;
    }

    .doc-preview-table {
        table-layout: auto;
    }
}
