:root {
    --bg: #0b0f17;
    --panel: #121a2a;
    --muted: #7f8aa3;
    --text: #e7eefc;
    --line: #24314e;
    --accent: #5bd6ff;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.topbar {
    padding: 16px 18px 10px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #0f1626, #0b0f17);
    position: sticky;
    top: 0;
    z-index: 10;
}

h1 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700
}

.searchWrap {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 820px;
}

#q {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0d1322;
    color: var(--text);
    outline: none;
}

#q:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91, 214, 255, .12);
}

#clearBtn {
    border: 1px solid var(--line);
    background: #0d1322;
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.layout {
    display: grid;
    grid-template-columns: 1.6fr .8fr;
    gap: 14px;
    padding: 14px 18px;
}

.panel,
.preview {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
}

h2 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #cfe2ff
}

.tableWrap {
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

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

thead th {
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    background: #0d1322;
    position: sticky;
    top: 0;
    z-index: 1;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.right {
    text-align: right
}

.small {
    width: 120px;
    white-space: nowrap
}

.desc {
    min-width: 320px
}

.rowBtn {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0d1322;
}

tr:hover {
    background: rgba(91, 214, 255, .06)
}

tr.active {
    background: rgba(91, 214, 255, .12)
}

.card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0d1322;
}

.imgBox {
    width: 160px;
    height: 120px;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: #0b0f17;
    display: flex;
    align-items: center;
    justify-content: center;
}

#previewImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta .name {
    font-size: 14px;
    font-weight: 700
}

.meta .code {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px
}

.meta .price {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 800
}

.meta .file {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted)
}