html, body {
    margin: 0;
    padding: 0;
    background-color: rgb(243, 243, 243);
    color: #222222;
    font-family: "Times New Roman", Times, serif;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

#body {
    width: 100%;
    padding-bottom: 10px;
}

.card {
    width: min(78%, 1156px);
    margin: 24px auto 0 auto;
    background-color: rgb(243, 243, 243);
    border: 1px solid #d8d8d8;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.module-card {
    overflow: hidden;
}

.cardTitle {
    color: rgb(90,19,92);
    font-size: 28px;
    font-weight: bold;
    padding: 12px 22px 10px 22px;
    border-bottom: 2px solid rgb(90,19,92);
    letter-spacing: 0.2px;
}

.cardContext,
.cardContext1 {
    padding: 18px 22px 12px 22px;
    background-color: rgb(243, 243, 243);
}

.cardP {
    font-size: 18px;
    line-height: 1.55;
    margin: 0;
}

.cardHr {
    border: 0;
    border-top: 1px solid #e5e0ea;
    margin: 24px 0 0 0;
}

.form-table {
    border: 0;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    border-collapse: collapse;
}

.form-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.item1 {
    font-size: 18px;
    white-space: nowrap;
    margin: 0;
}

.label-cell {
    width: 70px;
    text-align: left;
}

.wide-label {
    width: 130px;
}

.pvalue-label {
    width: 140px;
}

.small-input,
.select-input,
.tier-input,
.pvalue-input {
    font-size: 14px;
    height: 23px;
    box-sizing: border-box;
    border: 1px solid #bfb5c8;
    border-radius: 4px;
    padding: 0 8px;
    background: #ffffff;
}

.small-input {
    width: 90px;
}

.select-input {
    width: 83px;
}

.tier-input {
    width: 101px;
}

.pvalue-input {
    width: 71px;
}

.query_button {
    background-color: #d7d0dc;
    color: #4d3652;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 4px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.query_button p {
    margin: 0;
}

.section-cell {
    padding-top: 18px !important;
}

.section-title {
    font-size: 18px;
    margin: 8px 0;
}

#input_text {
    width: 75%;
    min-height: 210px;
    margin: 10px 0;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #bfb5c8;
    border-radius: 4px;
    font-size: 14px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.4;
}

.button-row {
    margin-top: 6px;
}

.right-buttons {
    text-align: right;
}

.tool-button,
.submit-button {
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
}

.tool-button {
    margin-left: 8px;
    border: 1px solid #bfb5c8;
    background: #f6f2f8;
    color: #4d3652;
    padding: 4px 10px;
}

.submit-button {
    width: 120px;
    height: 38px;
    margin-top: 15px;
    border: 0;
    background: rgb(90,19,92);
    color: #ffffff;
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.file-name {
    font-size: 16px;
    color: #555555;
}

.example-link,
.secondary-link {
    font-size: 16px;
    color: rgb(90,19,92);
    text-decoration: none;
}

.example-link {
    text-decoration: underline;
}

.example-link:hover,
.secondary-link:hover {
    text-decoration: underline;
}

.tip-text {
    font-size: 16px;
    color: #555555;
    margin-top: 8px;
}

.error-box {
    width: 100%;
    margin: 0 auto 15px auto;
    padding: 10px 14px;
    border: 1px solid #cc7777;
    background-color: #fff1f1;
    color: #9b0000;
    font-size: 16px;
    border-radius: 4px;
}

.result-placeholder {
    text-align: left;
}

.result-message {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ddd2e6;
    background: #faf8fc;
    font-size: 16px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-message-success {
    border-color: #cfe6d2;
    background: #f4fbf5;
    color: #1b7f2a;
}

.result-message-failed {
    border-color: #f0c8cf;
    background: #fff5f7;
    color: #9b0000;
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ddd2e6;
    background: #faf8fc;
    flex-wrap: wrap;
}

.status-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgb(90,19,92);
}

.status-text {
    font-size: 17px;
    line-height: 1.4;
}

.status-success {
    border-color: #cfe6d2;
    background: #f4fbf5;
}

.status-success .status-chip {
    background: #1b7f2a;
}

.status-failed {
    border-color: #f0c8cf;
    background: #fff5f7;
}

.status-failed .status-chip {
    background: #b00020;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 16px;
}

.meta-table th,
.meta-table td {
    border: 1px solid #ddd6e4;
    padding: 8px 12px;
    text-align: left;
}

.meta-table th {
    width: 180px;
    background: #f6f2f8;
    color: #4b3450;
    font-weight: bold;
}

.section-heading {
    margin: 16px 0 10px 0;
    color: rgb(90,19,92);
    font-size: 20px;
    font-weight: bold;
}

.notice-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.notice-item {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.notice-info {
    background: #f8f6fb;
    border-color: #e5dcee;
    color: #4b3450;
}

.notice-warning {
    background: #fff9ef;
    border-color: #f0dfb9;
    color: #7a5a19;
}

.notice-error {
    background: #fff1f1;
    border-color: #e4b8bd;
    color: #9b0000;
}

.notice-success {
    background: #f1fbf3;
    border-color: #cfe6d2;
    color: #1b7f2a;
}

.empty-note {
    margin: 8px 0 0 0;
    color: #666666;
    font-size: 16px;
}

.log-details {
    margin-top: 14px;
    border: 1px solid #ddd6e4;
    border-radius: 6px;
    background: #fbfafc;
    padding: 10px 12px;
}

.log-details summary,
.table-details summary {
    cursor: pointer;
    font-size: 17px;
    font-weight: bold;
    color: #4b3450;
}

.log-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.log-panel {
    min-width: 0;
}

.log-label {
    margin-bottom: 6px;
    font-weight: bold;
    color: #4b3450;
}

.log-box {
    width: 100%;
    max-height: 350px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    background-color: #f7f7f7;
    border: 1px solid #cccccc;
    border-radius: 4px;
    text-align: left;
    white-space: pre-wrap;
    font-size: 13px;
    box-sizing: border-box;
}

.error-log {
    background-color: #fff5f5;
    border-color: #e0aaaa;
}

.result-area {
    display: flex;
    flex-direction: column;
}

.download-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.archive-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 4px;
    background: rgb(90,19,92);
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
}

.archive-button:hover {
    background: #7a1a7c;
}

.pdf-card {
    border: 1px solid #ddd6e4;
    border-radius: 6px;
    margin-bottom: 18px;
    overflow: hidden;
    background: #ffffff;
}

.pdf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #f8f6fb;
    border-bottom: 1px solid #ddd6e4;
}

.file-name-line {
    font-size: 17px;
    font-weight: bold;
    color: #4b3450;
    word-break: break-all;
}

.pdf-viewer {
    width: 100%;
    height: 760px;
    border: 0;
    display: block;
    background: #ffffff;
}

.table-details {
    border: 1px solid #ddd6e4;
    border-radius: 6px;
    margin: 0 0 14px 0;
    padding: 10px 12px;
    background: #ffffff;
}

.table-details[open] {
    box-shadow: inset 0 0 0 1px rgba(90, 19, 92, 0.03);
}

.table-summary-name {
    font-weight: normal;
    color: #6e6275;
    font-size: 15px;
}

.table-scroll {
    max-height: 360px;
    overflow: auto;
    margin-top: 12px;
    border: 1px solid #ddd6e4;
    border-radius: 4px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: #ffffff;
}

.result-table th,
.result-table td {
    border: 1px solid #ddd6e4;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.result-table th {
    background-color: #f6f2f8;
    color: #4b3450;
    font-weight: bold;
}

.sticky-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.file-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e5ddee;
    border-radius: 4px;
    background: #faf8fc;
}

.file-item span {
    word-break: break-all;
}

.footer {
    background-color: rgb(90,19,92);
    min-height: 60px;
    line-height: 20px;
    text-align: center;
    color: white;
    padding-top: 12px;
    box-sizing: border-box;
    margin-top: 18px;
}

.footer-line {
    height: 20px;
    line-height: 20px;
}

@media (max-width: 1100px) {
    .card {
        width: 95%;
    }

    .form-table,
    .result-table,
    .table-scroll,
    .log-box {
        width: 100%;
    }

    .form-table tr,
    .form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .log-grid {
        grid-template-columns: 1fr;
    }

    .pdf-viewer {
        height: 540px;
    }

    .small-input,
    .select-input,
    .tier-input,
    .pvalue-input {
        width: 220px;
    }
}
