html, body {
    min-height: 100%;
}

button {
    border: 1px solid #4e667d;
    background: #cccccc;
    color: #000;
    padding: 4px 14px;
    cursor: pointer;
}

button:hover {
    background: #fff;
}

.header::after,
div.hideSkiplink::after,
div.menu ul::after {
    content: "";
    display: block;
    clear: both;
}

.main {
    clear: both;
}

.link-button {
    border: 0;
    background: transparent;
    color: #034af3;
    font-size: x-small;
    padding: 0 0 0 8px;
    text-decoration: underline;
}

.muted {
    color: #666;
}

.legacy-data-grid {
    display: grid;
    overflow-x: auto;
    width: 98%;
    margin: 10px 0 24px 10px;
    font-size: 1.05em;
}

.legacy-data-cell {
    border: 1px solid #999;
    padding: 6px 8px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.legacy-data-header {
    background: #d5d5aa;
    font-weight: 700;
}

.legacy-data-table {
    width: 98%;
    margin: 10px 0 24px 10px;
    border-collapse: collapse;
    font-size: 1.05em;
}

.legacy-data-table th,
.legacy-data-table td {
    border: 1px solid #999;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.legacy-data-table th {
    background: #d5d5aa;
    font-weight: 700;
}

.license-services-grid {
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) auto;
}

.license-products-grid {
    grid-template-columns: minmax(120px, 1fr) minmax(110px, 1fr) minmax(130px, 1fr) minmax(110px, .8fr) minmax(180px, 1.5fr) minmax(120px, 1fr) auto;
}

.license-orders-grid {
    grid-template-columns: minmax(260px, 2fr) minmax(110px, .8fr) auto;
}

.license-documents-grid {
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) minmax(190px, 1.2fr) auto;
}

.license-documents-table th:nth-child(1),
.license-documents-table td:nth-child(1) {
    width: 24%;
}

.license-documents-table th:nth-child(2),
.license-documents-table td:nth-child(2) {
    width: 46%;
}

.license-documents-table th:nth-child(3),
.license-documents-table td:nth-child(3) {
    width: 16%;
}

.license-documents-table th:nth-child(4),
.license-documents-table td:nth-child(4) {
    width: 14%;
    white-space: nowrap;
}

.license-service-button {
    display: inline-block;
    min-width: 76px;
    border: 1px solid #4e667d;
    background: #cccccc;
    color: #000;
    padding: 4px 14px;
    text-align: center;
    text-decoration: none;
}

.form-grid {
    display: grid;
    grid-template-columns: 150px minmax(180px, 1fr);
    gap: 8px 12px;
    align-items: center;
}

.form-grid label {
    font-weight: 700;
}

.wide-textarea {
    width: min(920px, 96%);
    min-height: 180px;
    font-family: Consolas, "Courier New", monospace;
}

.service-shell fieldset {
    max-width: 980px;
}

.edi-profile-page {
    width: 100%;
    max-width: none;
    margin: 20px 0 32px;
    padding: 0 14px;
    color: #20242a;
    clear: both;
}

.edi-topbar {
    margin-bottom: 14px;
    display: flex;
    justify-content: flex-start;
    text-align: left;
    clear: both;
}

.edi-back-btn,
.edi-toolbar button,
.edi-link-btn {
    border-radius: 4px;
}

.edi-back-btn {
    display: inline-flex;
    margin-left: 0;
    float: none;
}

.edi-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    border: 1px solid #d7dde5;
    background: #f9fafb;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.edi-title-row h2 {
    margin: 0 0 6px;
}

.edi-title-row p {
    margin: 0;
    color: #5c6672;
}

.edi-summary {
    display: grid;
    gap: 6px;
    min-width: 220px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #d7dde5;
}

.edi-message {
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid;
    font-weight: 700;
}

.edi-message-ok {
    color: #256029;
    border-color: #b8ddc0;
    background: #eef8f0;
}

.edi-message-error {
    color: #9f1f18;
    border-color: #efc3bf;
    background: #fff2f0;
}

.edi-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #d7dde5;
    background: #fff;
}

.edi-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edi-toolbar label span:first-child {
    font-weight: 700;
}

.edi-toolbar select {
    min-width: 110px;
    padding: 4px 6px;
    border: 1px solid #9ea9b5;
}

.edi-check span {
    font-weight: 400;
}

.edi-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.edi-toolbar .edi-primary {
    background: #0b5cab;
    border-color: #084a8a;
    color: #fff;
}

.edi-grid-wrap {
    border: 1px solid #d7dde5;
    overflow-x: auto;
    background: #fff;
}

.edi-profile-grid {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

.edi-profile-grid th {
    position: sticky;
    top: 0;
    background: #eef1f5;
    color: #26313d;
    text-align: left;
    padding: 10px 9px;
    border-bottom: 1px solid #d7dde5;
}

.edi-profile-grid td {
    padding: 9px;
    border-bottom: 1px solid #edf0f3;
    vertical-align: top;
}

.edi-profile-grid tbody tr:hover {
    background: #f8fbff;
}

.edi-row-inactive {
    background: #f7f7f7;
    color: #8a8f96;
}

.edi-row-inactive .edi-link-btn {
    color: #8a8f96;
}

.edi-muted {
    color: #6b7280;
    font-size: 12px;
}

.edi-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.edi-tag-ok {
    background: #e8f6ea;
    color: #256029;
}

.edi-tag-neutral {
    background: #f1f2f4;
    color: #606873;
}

.edi-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 220px;
}

.edi-link-btn {
    border: 0;
    background: transparent;
    color: #064f9e;
    padding: 0;
    text-decoration: underline;
    text-align: left;
}

.edi-link-btn:hover {
    background: transparent;
    color: #033a75;
}

.edi-danger-link {
    color: #a32117;
}

.edi-empty {
    color: #666;
    padding: 18px;
}

@media (max-width: 760px) {
    .edi-title-row {
        display: block;
    }

    .edi-summary {
        margin-top: 12px;
    }

    .edi-toolbar-actions {
        width: 100%;
        margin-left: 0;
    }
}

.edi-edit-page {
    width: 100%;
    max-width: none;
    margin: 20px 0 32px;
    padding: 0 14px;
    color: #20242a;
    clear: both;
}

.edi-edit-topbar {
    margin-bottom: 14px;
    display: flex;
    justify-content: flex-start;
    clear: both;
}

.edi-edit-title {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 14px;
    border: 1px solid #d7dde5;
    background: #f9fafb;
    padding: 14px 16px;
}

.edi-edit-title h2 {
    margin: 0;
}

.edi-edit-title div {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #4b5563;
}

.edi-edit-card {
    border: 1px solid #d7dde5;
    background: #fff;
    margin-bottom: 18px;
}

.edi-edit-card header {
    background: #eef1f5;
    border-bottom: 1px solid #d7dde5;
    padding: 10px 14px;
    font-weight: 700;
    color: #26313d;
}

.edi-edit-body {
    padding: 14px;
}

.edi-edit-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px 16px;
}

.edi-edit-grid label,
.edi-textarea-label {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.edi-edit-grid input,
.edi-edit-grid select,
.edi-edit-body textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    border: 1px solid #aab4c0;
    background: #fff;
}

.edi-edit-grid select:disabled {
    background: #eef1f5;
    color: #4b5563;
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }

.edi-inline-check {
    align-self: end;
    display: inline-flex !important;
    gap: 6px;
    align-items: center;
    min-height: 34px;
    margin-bottom: 0 !important;
}

.edi-inline-check input {
    width: auto;
}

.edi-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-bottom: 14px;
}

.edi-option-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edi-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 4px;
}

.edi-edit-actions .edi-primary {
    background: #0b5cab;
    border-color: #084a8a;
    color: #fff;
}

.edi-danger-button {
    background: #b42318;
    border-color: #8f1c13;
    color: #fff;
}

.edi-dialog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(15, 23, 42, 0.36);
}

.edi-dialog-overlay.visible {
    display: block;
}

.edi-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 5010;
    min-width: 260px;
    padding: 24px;
    transform: translate(-50%, -50%);
    border: 1px solid #b9c6d6;
    background: #fff;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.28);
    text-align: center;
}

.edi-dialog.visible {
    display: block;
}

.edi-dialog-message {
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 700;
    color: #20242a;
}

.edi-test-page {
    width: 100%;
    max-width: none;
    margin: 20px 0 32px;
    padding: 0 14px;
    color: #20242a;
    clear: both;
}

.edi-test-topbar {
    margin-bottom: 14px;
    display: flex;
    justify-content: flex-start;
    clear: both;
}

.edi-test-title {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 14px;
    border: 1px solid #d7dde5;
    background: #f9fafb;
    padding: 16px 18px;
}

.edi-test-title h2 {
    margin: 0 0 6px;
}

.edi-test-title p {
    margin: 0;
    color: #5c6672;
}

.edi-test-card {
    border: 1px solid #d7dde5;
    background: #fff;
    margin-bottom: 18px;
}

.edi-test-card header {
    background: #eef1f5;
    border-bottom: 1px solid #d7dde5;
    padding: 10px 14px;
    font-weight: 700;
    color: #26313d;
}

.edi-test-body {
    padding: 14px;
}

.edi-test-profile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px 18px;
}

.edi-test-profile-grid div {
    border: 1px solid #e2e7ee;
    background: #fbfcfd;
    padding: 10px 12px;
}

.edi-test-profile-grid span,
.edi-test-file span:first-child {
    display: block;
    color: #5c6672;
    font-weight: 700;
    margin-bottom: 5px;
}

.edi-test-profile-grid strong,
.edi-test-file-box strong {
    display: block;
    color: #111827;
    overflow-wrap: anywhere;
}

.edi-test-file input[type="file"] {
    display: block;
    width: min(560px, 100%);
    box-sizing: border-box;
    border: 1px solid #aab4c0;
    padding: 8px;
    background: #fff;
}

.edi-test-file-box {
    margin-top: 12px;
    width: min(560px, 100%);
    border: 1px solid #d7dde5;
    background: #f9fafb;
    padding: 9px 10px;
}

.edi-test-file-box span {
    color: #6b7280;
    font-size: 12px;
}

.edi-test-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.edi-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 4px;
}

.edi-test-actions .edi-primary {
    background: #0b5cab;
    border-color: #084a8a;
    color: #fff;
}

@media (max-width: 860px) {
    .edi-test-title {
        display: block;
    }

    .edi-test-title .edi-summary {
        margin-top: 12px;
    }

    .edi-test-profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .edi-edit-title {
        display: block;
    }

    .edi-edit-title div {
        margin-top: 8px;
    }

    .edi-edit-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .span-1,
    .span-2,
    .span-3,
    .span-4,
    .span-5,
    .span-6,
    .span-12 {
        grid-column: span 6;
    }
}

.svc-wrap {
    width: fit-content;
    min-width: min(96vw, 1300px);
    max-width: 96vw;
}

.svc-header {
    margin: 0 0 14px 0;
}

.svc-col {
    margin: 14px 0;
}

.svc-card {
    border: 1px solid #dcdcdc;
    background: #ffffff;
    padding: 14px 16px;
}

.svc-card h3 {
    margin: 0 0 10px 0;
}

.svc-actions {
    margin-top: 10px;
}

.svc-msg {
    margin: 10px 0 0 0;
}

.svc-msg-success {
    color: #15803d;
    font-weight: 600;
}

.btn {
    padding: 6px 12px;
    border: 1px solid #999;
    background: #f5f5f5;
    cursor: pointer;
    box-sizing: border-box;
}

.btn-primary {
    border-color: #2a72d4;
    background: #2a72d4;
    color: #fff;
}

.btn-danger {
    border-color: #b91c1c;
    background: #b91c1c;
    color: #fff;
}

.help {
    color: #666;
    font-size: 12px;
    margin-top: 8px;
}

.svc-links {
    margin-top: 8px;
}

.svc-links a {
    margin-right: 14px;
}

.svc-grid {
    margin-top: 10px;
    overflow-x: auto;
}

.svc-grid table {
    width: 100%;
    min-width: 1460px;
    border-collapse: collapse;
    table-layout: fixed;
}

.svc-grid th:nth-child(1),
.svc-grid td:nth-child(1) {
    width: 145px;
}

.svc-grid th:nth-child(3),
.svc-grid td:nth-child(3) {
    width: 240px;
}

.svc-grid th:nth-child(4),
.svc-grid td:nth-child(4) {
    width: 105px;
}

.svc-grid th:last-child,
.svc-grid td:last-child {
    width: 560px;
}

.svc-actions-cell {
    min-width: 560px;
    white-space: nowrap;
}

.svc-grid th {
    text-align: left;
    background: #f5f5f5;
    border-bottom: 1px solid #dcdcdc;
    padding: 8px;
    vertical-align: middle;
}

.svc-grid td {
    border-bottom: 1px solid #efefef;
    padding: 8px;
    vertical-align: middle;
}

.mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.trunc {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.actions {
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    white-space: nowrap;
}

.actions .btn {
    flex: 0 0 auto;
}

.actions .btnbar {
    display: inline-flex;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    max-width: 100%;
}

.svc-download-actions {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    column-gap: 8px;
    width: max-content;
    min-width: max-content;
    white-space: nowrap;
}

.svc-download-actions .btn {
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: none;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .svc-wrap {
        width: 96vw;
        min-width: 0;
    }

    .svc-grid table {
        min-width: 1100px;
    }

    .actions {
        display: flex;
        width: auto;
        max-width: 100%;
        flex-wrap: wrap;
        white-space: normal;
    }

    .svc-actions-cell {
        min-width: 0;
    }

    .svc-download-actions {
        display: inline-flex;
        flex-wrap: wrap;
        width: auto;
        min-width: 0;
        white-space: normal;
    }
}

.input-shell {
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.input-header {
    padding: 14px 16px 0 16px;
    border-bottom: 1px solid #e9e9e9;
    background: #fafafa;
}

.input-tabbar {
    display: flex;
    align-items: flex-end;
    margin: 0;
    padding: 0;
}

.input-tabbar .tab-btn {
    appearance: none;
    border: 1px solid #d0d7de;
    border-bottom: none;
    background: #eef2f6;
    color: #374151;
    padding: 9px 14px;
    margin: 0 4px 0 0;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    position: relative;
    top: 1px;
}

.input-tabbar .tab-btn-active {
    background: #ffffff;
    color: #111827;
    border-color: #dcdcdc;
    z-index: 2;
}

.input-tabbar .tab-btn-inactive {
    background: #eef2f6;
    color: #4b5563;
}

.input-body {
    padding: 14px 16px 16px 16px;
    background: #fff;
}

.input-panel-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.svc-small-title {
    font-size: 14px;
    margin-bottom: 6px;
}

.svc-file-button {
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.svc-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.paste-box {
    width: 100%;
    min-height: 220px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    box-sizing: border-box;
    white-space: pre-wrap;
}

.muted,
.muted-inline {
    color: #666;
    font-size: 12px;
}

.svc-upload-options {
    margin-top: 12px;
    max-width: 560px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    z-index: 9998;
}

.modal-overlay.visible {
    display: block;
}

.modal {
    position: fixed;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 560px;
    background: #fff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    padding: 14px 16px;
    display: none;
    z-index: 9999;
    border-radius: 6px;
}

.modal.visible {
    display: block;
}

.modal h4 {
    margin: 0 0 10px 0;
}

.modal .row {
    margin: 10px 0;
}

.modal .optlist label {
    display: block;
    margin: 6px 0;
}

.modal .btnbar-right {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.tos-modal {
    position: fixed;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 88vw;
    min-width: 900px;
    max-width: 1180px;
    height: 86vh;
    min-height: 620px;
    background: #fff;
    border: 1px solid #d0d7de;
    box-shadow: 0 18px 45px rgba(0,0,0,.32);
    display: none;
    z-index: 10000;
    border-radius: 6px;
    overflow: hidden;
}

.tos-modal.visible {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.tos-modal-head {
    padding: 14px 16px;
    border-bottom: 1px solid #d8dee4;
    background: #f6f8fa;
}

.tos-modal-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 0;
}

.tos-toc {
    border-right: 1px solid #d8dee4;
    background: #f6f8fa;
    padding: 12px 10px;
    overflow-y: auto;
}

.tos-toc-link {
    appearance: none;
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: #1f4e8c;
    text-align: left;
    padding: 7px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.25;
}

.tos-toc-link:hover,
.tos-toc-link:focus {
    background: #e9eef6;
    outline: none;
}

.tos-scroll-area {
    overflow: auto;
    min-height: 0;
    background: #fff;
}

.tos-content {
    min-width: 860px;
    padding: 20px 26px 34px 26px;
    color: #1f2937;
}

.tos-section {
    scroll-margin-top: 12px;
}

.tos-section h2 {
    margin: 18px 0 10px 0;
    font-size: 20px;
    letter-spacing: 0;
}

.tos-section:first-child h2 {
    margin-top: 0;
}

.tos-section p {
    margin: 9px 0;
    line-height: 1.45;
}

.tos-section ul {
    margin: 8px 0 12px 22px;
    padding: 0;
}

.tos-section li {
    margin: 4px 0;
    line-height: 1.42;
}

.tos-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid #d8dee4;
    background: #f6f8fa;
}

.svc-upload-options .row,
.svc-modal-body label {
    display: block;
    margin: 10px 0;
}

.filebox {
    padding: 8px 10px;
    border: 1px solid #dcdcdc;
    background: #fafafa;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    word-break: break-all;
}

.emailbox {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
}

.svc-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.svc-section-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.svc-section-links {
    text-align: right;
}

.svc-inline-link {
    font-size: 13px;
    text-decoration: none;
    color: #2b5dab;
    margin-left: 12px;
    cursor: pointer;
}

.svc-link-button {
    border: 0;
    background: transparent;
    padding: 0;
}

.svc-modal-overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2000;
    display: none;
}

.svc-modal-overlay.visible {
    display: block;
}

.svc-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 720px;
    max-width: 92%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 2001;
    display: none;
    border: 1px solid #dcdcdc;
}

.svc-modal.visible {
    display: block;
}

.svc-modal-head {
    padding: 14px 18px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.svc-modal-title {
    font-size: 18px;
    font-weight: 600;
}

.svc-modal-close {
    font-size: 24px;
    border: 0;
    background: transparent;
    color: #666;
    line-height: 1;
}

.svc-modal-body {
    padding: 18px;
}

.svc-modal-foot {
    padding: 14px 18px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.status-badge,
.days-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
}

.days-badge {
    min-width: 52px;
    text-align: center;
}

.status-uploaded {
    background: #eef2f7;
    color: #4b5563;
    border-color: #d1d5db;
}

.status-queued {
    background: #eef4ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.status-processing {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.status-complete {
    background: #ecfdf3;
    color: #15803d;
    border-color: #86efac;
}

.status-failed {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.status-deleted {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

.days-keep {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

.days-normal {
    background: #eef2f7;
    color: #374151;
    border-color: #d1d5db;
}

.days-warning {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.days-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.days-muted {
    background: #f9fafb;
    color: #9ca3af;
    border-color: #e5e7eb;
}

.storage-row-warning td {
    background: #fffaf0;
}

.storage-row-danger td {
    background: #fff5f5;
}

.edi-profile-box {
    border: 2px solid #dcdcdc;
    background: #fafafa;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.edi-profile-box.test-usage {
    border-color: #6fbe7b;
    background: #f6fff7;
}

.edi-profile-box.production-usage {
    border-color: #d98989;
    background: #fff8f8;
}

.svc-usage-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.svc-usage-badge.test {
    background: #e8f7eb;
    color: #2c7a38;
    border: 1px solid #9ad0a3;
}

.svc-usage-badge.production {
    background: #fdeaea;
    color: #a33a3a;
    border: 1px solid #e0a0a0;
}

.svc-profile-warning {
    border: 1px solid #e0b4b4;
    background: #fff6f6;
    color: #9f3a38;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.svc-entitlement {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 6px;
    display: grid;
    gap: 8px;
}

.svc-entitlement-ok {
    border: 1px solid #b8d7c1;
    background: #f4fbf6;
    color: #275f36;
}

.svc-entitlement-blocked {
    border: 1px solid #e0b4b4;
    background: #fff6f6;
    color: #9f3a38;
}

.svc-entitlement-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.svc-actions-right {
    justify-content: flex-end;
}

.svc-subscribe-modal {
    width: 760px;
}

.svc-subscribe-plan {
    width: min(390px, 100%);
}

.menu-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px 28px;
    width: 98%;
}

.download-list {
    display: grid;
    gap: 6px;
    width: min(760px, 98%);
    margin-left: 10px;
}

.download-list > div {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 18px;
    border-bottom: 1px solid #ddd;
    padding: 6px 0;
}

.welcome-menu-list {
    display: grid;
    gap: 14px;
    margin-left: 10px;
    width: min(920px, 98%);
}

.welcome-menu-item {
    line-height: 1.45;
}

.disabled-link {
    color: #777;
    text-decoration: none;
}

.ru-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.ru-section {
    margin-bottom: 22px;
}

.ru-card {
    background: #ffffff;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    padding: 18px 24px 18px 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    overflow: hidden;
}

.ru-top-card {
    padding: 18px;
}

.ru-top-grid {
    display: flex;
    gap: 18px;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
}

.ru-top-col {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    overflow: hidden;
}

.ru-inner-card {
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    padding: 12px;
    background: #fff;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.ru-inner-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.ru-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.ru-form-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.ru-form-row label {
    font-weight: 600;
    color: #444;
    padding-top: 6px;
    white-space: nowrap;
}

.ru-form-field {
    min-width: 0;
}

.ru-form-field > input,
.ru-form-field > textarea,
.ru-form-field > select,
.ru-form-field > span {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.ru-input,
.ru-input-wide,
.ru-multiline {
    display: block;
    border: 1px solid #bfc7d1;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.ru-multiline {
    height: 56px;
}

.ru-actions {
    margin-top: 14px;
}

.ru-button,
.ru-pay-btn {
    min-width: 150px;
    padding: 8px 14px;
    border: 1px solid #2f5fa7;
    background: #3b73c0;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.ru-button:hover,
.ru-pay-btn:hover {
    background: #2f67b2;
}

.ru-link {
    margin-left: 16px;
}

.ru-profile-message {
    margin-left: 14px;
    color: #2f5fa7;
    font-weight: 600;
}

.ru-status-wrap {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.ru-status-card {
    flex: 1 1 100%;
    border: 1px solid #d8e2f1;
    border-left: 5px solid #3b73c0;
    background: #f7fbff;
    border-radius: 8px;
    padding: 16px 18px;
}

.ru-status-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #264b82;
}

.ru-status-row {
    margin-bottom: 6px;
}

.ru-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2px;
}

.ru-badge-active {
    background: #e7f7eb;
    color: #1d7f3a;
    border: 1px solid #b8e0c4;
}

.ru-badge-warning {
    background: #fff6df;
    color: #8a6500;
    border: 1px solid #efd58e;
}

.ru-badge-expired {
    background: #fdeaea;
    color: #a12a2a;
    border: 1px solid #efb2b2;
}

.ru-note {
    margin-top: 10px;
    color: #555;
    line-height: 1.5;
}

.ru-note-strong {
    color: #7a1f1f;
    font-weight: 700;
}

.ru-plan-area {
    margin-top: 18px;
}

.ru-plan-grid {
    display: flex;
    gap: 18px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.ru-plan-card {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid #d7dce4;
    border-radius: 10px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.ru-plan-card h4 {
    margin: 0 0 8px 0;
    font-size: 19px;
    color: #264b82;
}

.ru-plan-subtitle {
    color: #666;
    min-height: 36px;
    margin-bottom: 12px;
}

.ru-plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #2f67b2;
    margin-bottom: 10px;
}

.ru-plan-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 14px;
    min-height: 32px;
}

.ru-plan-list {
    margin: 0 0 16px 18px;
    padding: 0;
    color: #444;
    line-height: 1.5;
    min-height: 92px;
}

.ru-plan-list li {
    margin-bottom: 6px;
}

.ru-disabled-box {
    border: 1px dashed #c9c9c9;
    background: #fafafa;
    border-radius: 8px;
    padding: 14px 16px;
    color: #666;
    margin-top: 18px;
}

.ru-inline-msg {
    margin-top: 12px;
    color: #666;
    line-height: 1.5;
}

.ru-renew-message {
    display: block;
    margin-top: 14px;
    color: #a12a2a;
    font-weight: 600;
}

.ru-service-link {
    display: inline-block;
    margin-top: 12px;
}

@media (max-width: 1180px) {
    .ru-top-grid {
        flex-wrap: wrap;
    }

    .ru-top-col {
        flex: 1 1 100%;
    }

    .ru-plan-grid {
        flex-wrap: wrap;
    }

    .ru-plan-card {
        flex: 1 1 300px;
    }
}

@media (max-width: 768px) {
    .ru-form-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .ru-form-row label {
        padding-top: 0;
        white-space: normal;
    }
}

#blazor-error-ui {
    background: #fff6df;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}
