* { box-sizing: border-box; }
body {
    font-family: Tahoma, "Segoe UI", sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #222;
}
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
header.topbar {
    background: #1f2a44;
    color: #fff;
    padding: 16px 0;
}
header.topbar .container { display: flex; justify-content: space-between; align-items: center; }
header.topbar a { color: #fff; text-decoration: none; margin-right: 16px; font-weight: bold; }
header.topbar nav a { font-weight: normal; opacity: .85; }
header.topbar nav a:hover { opacity: 1; }

.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); margin-bottom: 20px; }
h1, h2 { margin-top: 0; }

.stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-box { background: #fff; border-radius: 10px; padding: 20px; flex: 1; min-width: 160px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.stat-box .num { font-size: 28px; font-weight: bold; color: #1f2a44; }

form label { display: block; margin: 10px 0 4px; font-weight: bold; }
input[type=text], input[type=file], input[type=search] {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px;
}
button, .btn {
    background: #1f2a44; color: #fff; border: none; padding: 10px 18px;
    border-radius: 6px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #33456f; }
.btn.danger { background: #a83232; }
.btn.danger:hover { background: #c23e3e; }
.btn.secondary { background: #6c757d; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; background: #fff; }
th, td { padding: 10px; border-bottom: 1px solid #eee; text-align: right; font-size: 14px; }
th { background: #f0f2f5; }
tr:hover { background: #fafafa; }

.badge { display: inline-block; background: #e8ecf3; color: #1f2a44; border-radius: 4px; padding: 2px 8px; font-size: 12px; margin: 2px; }
.result-msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.result-msg.ok { background: #e5f6ea; color: #1e7e34; }
.result-msg.err { background: #fdeaea; color: #a83232; }

.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 6px; background: #fff; border: 1px solid #ddd; text-decoration: none; color: #333; }
.pagination .active { background: #1f2a44; color: #fff; border-color: #1f2a44; }

.search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.checkbox-row input { width: auto; }

.progress-outer { background: #e8ecf3; border-radius: 8px; overflow: hidden; height: 24px; }
.progress-inner { background: #1f2a44; height: 100%; width: 0%; transition: width .2s; color: #fff; font-size: 12px; line-height: 24px; text-align: center; white-space: nowrap; }
.file-log-item { padding: 8px 12px; border-radius: 6px; margin-bottom: 6px; background: #eef1f6; font-size: 13px; }
.file-log-item.ok { background: #e5f6ea; color: #1e7e34; }
.file-log-item.err { background: #fdeaea; color: #a83232; }
.spinner-text { color: #555; font-size: 13px; }
#resultsContainer { position: relative; min-height: 40px; }
#resultsContainer.loading { opacity: .5; }
