* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #17212b;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
}

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

.topbar h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.topbar p {
    margin: 0;
    color: #5d6975;
}

.records-link {
    display: inline-block;
    padding: 10px 14px;
    color: #fff;
    background: #0b5cab;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.records-link.danger {
    background: #9b1c1c;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.notice {
    padding: 12px 14px;
    background: #fff9e8;
    border: 1px solid #ead69a;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #4b3b08;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid #e3e7ec;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

input[type="file"] {
    width: 100%;
    padding: 11px;
    border: 1px dashed #9aa8b8;
    border-radius: 8px;
    background: #fafafa;
}

.preview-box {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    border: 1px solid #dce2e8;
    background: #fbfcfd;
    border-radius: 10px;
    overflow: hidden;
}

.preview-box img {
    display: block;
    max-width: 100%;
    max-height: 380px;
}

#previewPlaceholder {
    color: #7d8996;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 11px 15px;
    color: #fff;
    background: #0b5cab;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #084d90;
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

button.secondary {
    background: #5d6975;
}

.progress {
    margin-top: 16px;
}

.progress-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #334155;
}

.bar {
    height: 10px;
    background: #e8edf3;
    border-radius: 99px;
    overflow: hidden;
}

.bar span {
    display: block;
    width: 0;
    height: 100%;
    background: #0b5cab;
    transition: width 0.2s ease;
}

.raw-box {
    margin-top: 18px;
}

.raw-box summary {
    cursor: pointer;
    font-weight: 700;
}

label {
    display: block;
    margin-bottom: 14px;
    font-weight: 700;
    color: #263444;
}

input[type="text"],
input[type="password"],
textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 10px 11px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 400;
    color: #17212b;
    background: #fff;
}

textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    gap: 12px;
}

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

.form-row.three {
    grid-template-columns: 1fr 110px 150px;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.checkline input {
    width: 18px;
    height: 18px;
}

.status {
    font-weight: 700;
}

.status.good {
    color: #067647;
}

.status.bad,
.error {
    color: #b42318;
}

.login-box {
    max-width: 420px;
    margin: 80px auto;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #e3e7ec;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    background: #102a3a;
    color: #fff;
}

pre {
    white-space: pre-wrap;
    max-width: 360px;
    max-height: 220px;
    overflow: auto;
    background: #f6f8fb;
    padding: 8px;
    border-radius: 6px;
}

@media (max-width: 860px) {
    .grid,
    .form-row.two,
    .form-row.three {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .page {
        padding: 16px;
    }
}

.ocr-filled {
    border-color: #0b5cab !important;
    box-shadow: 0 0 0 2px rgba(11, 92, 171, 0.12);
}

.customer-ocr-note {
    margin-top: 10px;
    font-size: 13px;
    color: #425466;
}
