
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f6f9;
    color: #263445;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 35px auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.page-header p,
.muted {
    color: #778493;
    margin: 0;
}

.version {
    padding: 6px 12px;
    border-radius: 20px;
    background: #e8efff;
    color: #315db5;
    font-weight: bold;
}

.panel {
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(20, 40, 70, 0.035);
}

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

.key-row {
    display: flex;
    gap: 10px;
}

.key-row input {
    flex: 1;
    min-width: 0;
    height: 42px;
    border: 1px solid #cfd7e2;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 14px;
}

.key-row input:focus {
    outline: 2px solid #c9d9ff;
    border-color: #4778d8;
}

.button {
    border: 0;
    border-radius: 7px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.primary {
    background: #2865cc;
    color: white;
}

.primary:hover:not(:disabled) {
    background: #1e54b4;
}

.secondary {
    background: #edf1f6;
    color: #34445a;
}

.danger-outline {
    background: white;
    border: 1px solid #d9a3a3;
    color: #b33b3b;
}

.key-status {
    margin-top: 12px;
    color: #778493;
}

.key-status.success {
    color: #16834c;
}

.key-status.error {
    color: #c03939;
}

.hidden {
    display: none !important;
}

#logoutButton {
    margin-top: 12px;
}

.drop-zone {
    border: 2px dashed #aebdd1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #fbfcfe;
    transition: background 0.15s, border-color 0.15s;
}

.drop-zone.active {
    border-color: #2865cc;
    background: #edf4ff;
}

.drop-zone.locked {
    opacity: 0.58;
    background: #f7f8fa;
}

.drop-icon {
    font-size: 38px;
    color: #4778d8;
}

.drop-zone h3 {
    margin: 10px 0;
    font-size: 18px;
}

.drop-zone p {
    color: #778493;
}

.upload-note {
    margin-top: 22px;
    font-size: 12px;
}

.upload-status {
    min-height: 20px;
    margin-bottom: 0;
}

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

.records-header h2 {
    margin-bottom: 8px;
}

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

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

th, td {
    padding: 12px 10px;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f7f9fc;
    color: #596a7d;
    font-weight: 600;
}

.file-name {
    max-width: 190px;
    overflow-wrap: anywhere;
}

.download-link {
    display: inline-block;
    max-width: 230px;
    overflow-wrap: anywhere;
    color: #2865cc;
    text-decoration: none;
}

.download-link:hover {
    text-decoration: underline;
}

.status-success {
    color: #16834c;
}

.status-failed {
    color: #c03939;
}

.status-uploading {
    color: #2865cc;
}

.record-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.small-button {
    border: 1px solid #d5deea;
    background: white;
    color: #34445a;
    padding: 6px 9px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.small-button:hover {
    background: #f0f4fa;
}

.progress {
    width: 100px;
    height: 7px;
    margin-top: 5px;
    accent-color: #2865cc;
}

.empty-message {
    text-align: center;
    color: #8a96a5;
    padding: 30px 10px;
}

footer {
    text-align: center;
    color: #98a2ae;
    padding: 12px;
    font-size: 12px;
}

@media (max-width: 650px) {
    .container {
        width: calc(100% - 20px);
        margin: 18px auto;
    }

    .panel {
        padding: 17px;
    }

    .key-row {
        flex-wrap: wrap;
    }

    .key-row input {
        flex-basis: 100%;
    }

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

    .page-header h1 {
        font-size: 23px;
    }
}
