* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1b1f23;
}
.wrap {
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;
}
.topbar {
    margin-bottom: 18px;
}
.topbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
h1, h2 { margin: 0 0 12px; }
.card {
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.grid-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 12px;
}
.grid-form .full { grid-column: 1 / -1; }
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
}
.mini-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafbfc;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    padding: 14px;
}
label {
    display: block;
    font-size: 12px;
    color: #5c6670;
    margin-bottom: 6px;
}
input[type="text"], input[type="number"], select, input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9d1d9;
    border-radius: 8px;
    background: #fff;
}
button, .btn-secondary, .btn-danger {
    display: inline-block;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    background: #1f6feb;
    color: #fff;
    font-weight: 600;
}
.btn-secondary { background: #6c757d; }
.btn-danger { background: #d73a49; }
.alert {
    margin-bottom: 18px;
    background: #fff7d6;
    border: 1px solid #ead27a;
    padding: 12px 14px;
    border-radius: 10px;
}
.muted { color: #6a737d; }
.small { font-size: 12px; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #e8eaed;
    text-align: left;
    vertical-align: top;
}
th {
    background: #fafbfc;
    position: sticky;
    top: 0;
    z-index: 1;
}
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge.ok { background: #daf5dc; color: #146c2e; }
.badge.url_mismatch, .badge.mismatch { background: #fff1d6; color: #9a6700; }
.badge.not_found, .badge.notfound { background: #f3f4f6; color: #374151; }
.badge.error { background: #fde2e1; color: #a40e26; }
.flag {
    display: inline-block;
    margin: 2px 6px 2px 0;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
}
.flag.drop { background: #fde2e1; color: #a40e26; }
.flag.restore { background: #daf5dc; color: #146c2e; }
.flag.mismatch { background: #fff1d6; color: #9a6700; }
.actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.stats-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.progress-box {
    display: grid;
    gap: 8px;
}
.progress-row { font-size: 14px; }
.bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
.bar span {
    display: block;
    height: 100%;
    background: #1f6feb;
}
.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
a { color: #0969da; }
@media (max-width: 1100px) {
    .grid-form, .action-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .topbar-flex { flex-direction: column; align-items: flex-start; }
}
