:root {
    --se-paper: #FFFBF5;
    --se-ink: #1C1917;
    --se-muted: #78716C;
    --se-line: #B45309;
    --se-dark: #292524;
    --se-accent: #F59E0B;
    --se-ok: #059669;
    --se-danger: #B91C1C;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(90deg, rgba(180, 83, 9, .05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(180, 83, 9, .05) 1px, transparent 1px),
        #F5EDE1;
    background-size: 28px 28px;
    color: var(--se-ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.single-entry-wrapper {
    width: min(1120px, calc(100% - 28px));
    margin: 26px auto 42px;
}

.single-entry-slot {
    position: relative;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    background: var(--se-dark);
    border: 2.5px solid var(--se-line);
    border-bottom: 0;
    color: #FDE68A;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.single-entry-led,
.single-entry-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 8px #22C55E;
    flex: 0 0 auto;
}

.single-entry-frame {
    background: var(--se-paper);
    border: 2.5px solid var(--se-line);
    box-shadow: 14px 14px 0 rgba(180, 83, 9, .18);
}

.single-entry-titlebar {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 120px;
    border-bottom: 2.5px solid var(--se-line);
}

.single-entry-back,
.single-entry-status {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    padding: 0 18px;
}

.single-entry-back {
    gap: 8px;
    color: #7C2D12;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    border-right: 2px solid var(--se-line);
}

.single-entry-back:hover {
    background: #FEF3C7;
}

.single-entry-heading {
    min-width: 0;
    padding: 20px 24px;
}

.single-entry-kicker,
.single-entry-panel-label {
    color: var(--se-line);
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.single-entry-heading h1 {
    margin: 6px 0 6px;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.05;
    font-weight: 900;
}

.single-entry-heading p {
    margin: 0;
    color: var(--se-muted);
    font-size: 13px;
    line-height: 1.6;
}

.single-entry-heading p span {
    color: #7C2D12;
    font-weight: 800;
}

.single-entry-status {
    gap: 8px;
    color: var(--se-ok);
    border-left: 2px solid var(--se-line);
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: 900;
}

.single-entry-panel {
    padding: 24px;
}

.single-entry-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.single-entry-panel-head h2 {
    margin: 5px 0 0;
    font-size: 22px;
    font-weight: 900;
}

.single-entry-template-badge {
    padding: 8px 12px;
    border: 2px solid var(--se-line);
    background: #FEF3C7;
    color: #7C2D12;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.single-entry-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.single-entry-field {
    min-width: 0;
}

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

.single-entry-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 900;
}

.single-entry-required {
    color: var(--se-danger);
    font-size: 12px;
}

.single-entry-field input,
.single-entry-field select,
.single-entry-field textarea {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    border: 2px solid #D6A35C;
    border-radius: 0;
    background: #FFF7ED;
    color: var(--se-ink);
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.single-entry-field textarea {
    min-height: 92px;
    resize: vertical;
}

.single-entry-field input:focus,
.single-entry-field select:focus,
.single-entry-field textarea:focus {
    border-color: var(--se-line);
    box-shadow: 5px 5px 0 rgba(180, 83, 9, .16);
    background: #fff;
}

.single-entry-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px;
    border: 2px dashed #D6A35C;
    color: var(--se-muted);
    font-weight: 800;
}

.single-entry-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 13px 14px;
    border: 2px solid #D6A35C;
    background: #FFF7ED;
    color: #7C2D12;
    font-size: 13px;
    line-height: 1.55;
}

.single-entry-message[hidden] {
    display: none;
}

.single-entry-message.error {
    border-color: #DC2626;
    background: #FEF2F2;
    color: #991B1B;
}

.single-entry-message.success {
    border-color: #059669;
    background: #ECFDF5;
    color: #065F46;
}

.single-entry-message strong,
.single-entry-message span {
    display: block;
}

.single-entry-progress {
    margin-top: 18px;
    padding: 14px;
    border: 2px solid #D6A35C;
    background: #FFF7ED;
}

.single-entry-progress[hidden] {
    display: none;
}

.single-entry-progress-track {
    height: 10px;
    overflow: hidden;
    background: #E7D3B5;
    border: 1px solid #D6A35C;
}

.single-entry-progress-fill {
    width: 8%;
    height: 100%;
    background: var(--se-line);
    transition: width .25s ease;
}

.single-entry-progress-text {
    margin-top: 8px;
    color: var(--se-muted);
    font-size: 12px;
    font-weight: 800;
}

.single-entry-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.single-entry-submit,
.single-entry-secondary {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.single-entry-submit {
    border: 2.5px solid var(--se-line);
    background: var(--se-line);
    color: #fff;
}

.single-entry-submit:hover {
    background: #92400E;
}

.single-entry-submit:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.single-entry-secondary {
    border: 2px solid #D6A35C;
    background: #FFF7ED;
    color: #7C2D12;
}

@media (max-width: 820px) {
    .single-entry-wrapper {
        width: calc(100% - 16px);
        margin: 10px auto 24px;
    }

    .single-entry-titlebar {
        grid-template-columns: 1fr;
    }

    .single-entry-back,
    .single-entry-status {
        min-height: auto;
        justify-content: flex-start;
        border: 0;
        border-bottom: 2px solid var(--se-line);
        padding: 12px 16px;
    }

    .single-entry-heading,
    .single-entry-panel {
        padding: 16px;
    }

    .single-entry-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .single-entry-fields {
        grid-template-columns: 1fr;
    }

    .single-entry-submit,
    .single-entry-secondary {
        width: 100%;
    }
}

.single-entry-records {
    display: grid;
    gap: 18px;
}

.single-entry-record {
    border: 2px solid #D6A35C;
    background: rgba(255, 247, 237, .6);
    padding: 14px;
}

.single-entry-record-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px dashed rgba(180, 83, 9, .35);
}

.single-entry-record-head strong {
    font-size: 14px;
    font-weight: 900;
    color: #7C2D12;
}

.single-entry-record-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.single-entry-copy-record,
.single-entry-remove-record {
    border: 2px solid #D6A35C;
    background: #fff;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.single-entry-copy-record {
    color: #7C2D12;
}

.single-entry-remove-record {
    color: #991B1B;
}

.single-entry-copy-record:disabled,
.single-entry-remove-record:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.single-entry-result {
    margin-top: 20px;
    border: 2.5px solid var(--se-line);
    background: #fff;
}

.single-entry-result[hidden] {
    display: none;
}

.single-entry-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-bottom: 2px solid #D6A35C;
    background: #FFFBEB;
}

.single-entry-result-head h3 {
    margin: 4px 0 4px;
    font-size: 19px;
    font-weight: 900;
}

.single-entry-result-head p {
    margin: 0;
    color: var(--se-muted);
    font-size: 13px;
    line-height: 1.6;
}

.single-entry-result-count {
    min-width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid currentColor;
    font-family: "Courier New", monospace;
    font-size: 24px;
    font-weight: 900;
}

.single-entry-result-count.good {
    color: var(--se-ok);
    background: #ECFDF5;
}

.single-entry-result-count.bad {
    color: var(--se-danger);
    background: #FEF2F2;
}

.single-entry-result-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.single-entry-result-row {
    border: 2px solid #D6A35C;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.55;
}

.single-entry-result-row strong,
.single-entry-result-row span {
    display: block;
}

.single-entry-result-row.ok {
    border-color: #059669;
    background: #ECFDF5;
    color: #065F46;
}

.single-entry-result-row.error {
    border-color: #DC2626;
    background: #FEF2F2;
    color: #991B1B;
}

.single-entry-result-row ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.single-entry-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
    border-top: 2px solid #D6A35C;
    background: #FFF7ED;
}

.single-entry-submit:disabled,
.single-entry-secondary:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.single-entry-common-card,
.single-entry-section-title {
    margin-bottom: 18px;
}

.single-entry-common-card {
    border: 2.5px solid var(--se-line);
    background: #FFFBEB;
    padding: 16px;
    box-shadow: 6px 6px 0 rgba(180, 83, 9, .12);
}

.single-entry-common-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px dashed rgba(180, 83, 9, .35);
}

.single-entry-common-head h3,
.single-entry-section-title h3 {
    margin: 4px 0 4px;
    font-size: 18px;
    font-weight: 900;
    color: #7C2D12;
}

.single-entry-common-head p,
.single-entry-section-title p {
    margin: 0;
    color: var(--se-muted);
    font-size: 13px;
    line-height: 1.6;
}

.single-entry-section-title {
    padding: 0 2px;
}

.single-entry-common-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 820px) {
    .single-entry-common-card {
        padding: 14px;
    }

    .single-entry-common-fields {
        grid-template-columns: 1fr;
    }
}
