:root {
    --border: #dfe3e8;
    --muted: #5c6b7a;
    --bg: #eef1f4;
    --accent: #1668c4;        /* Aerial Titans blue */
    --accent-dark: #0f4f97;
    --gold: #f5a623;          /* brand gold accent */
    --ink: #14213d;           /* near-black header */
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #202223;
    background: var(--bg);
}
.wrap { max-width: 1600px; margin: 0 auto; padding: 24px 20px 48px; }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--ink); border-left: 4px solid var(--gold); padding-left: 10px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; padding-left: 14px; }
.sub strong { color: var(--accent-dark); }
.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
form.search { display: flex; gap: 8px; }
form.search input[type=text] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}
form.search input[type=text]:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
button, .btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
button:hover, .btn:hover { background: var(--accent-dark); }
.btn.secondary { background: #fff; color: #202223; border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--bg); }
.meta-row { display: flex; align-items: center; justify-content: flex-start; gap: 18px; margin-top: 12px; }
.stat { color: var(--muted); font-size: 13px; }
.stat strong { color: var(--ink); font-size: 14px; }
.stat[hidden] { display: none; }
.alert {
    background: #fff4f4;
    border: 1px solid #fdd;
    color: #8a1f11;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}
.note { color: var(--muted); font-size: 12px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; position: relative; }
th, td { text-align: left; padding: 12px 14px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
th { background: var(--ink); color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 11px; }
/* Proportional widths so all columns fit without horizontal scroll */
col.c-image     { width: 56px; }
col.c-sku       { width: 14%; }
col.c-title     { width: 19%; }
col.c-price     { width: 8%; }
col.c-class     { width: 13%; }
col.c-serial    { width: 13%; }
col.c-location  { width: 12%; }
col.c-meter     { width: 9%; }
col.c-condition { width: 11%; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #eaf2fb; }
td a { color: var(--accent-dark); font-weight: 500; text-decoration: none; }
td a:hover { text-decoration: underline; }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.sku-cell { position: relative; }
td.sku-cell a, td.sku-cell span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
}
/* custom SKU tooltip: big, blue background, white text */
td.sku-cell[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 14px;
    top: calc(100% - 8px);
    background: var(--accent);
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 8px 20px rgba(20, 33, 61, .28);
    pointer-events: none;
}
.empty { text-align: center; color: var(--muted); padding: 40px; }
.dash { color: #c9cccf; }
.thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); background: #fff; display: block; }
.thumb-empty { width: 44px; height: 44px; border-radius: 6px; border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; color: #c9cccf; font-size: 10px; }
td.img-cell { padding: 8px 10px; }
.loader {
    width: 48px;
    height: 48px;
    position: relative;
}
.loader::before, .loader::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48em;
    height: 48em;
    background-image:
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0),
        radial-gradient(circle 10px, var(--accent) 100%, transparent 0);
    background-position: 0em -18em, 0em 18em, 18em 0em, -18em 0em,
                         13em -13em, -13em -13em, 13em 13em, -13em 13em;
    background-repeat: no-repeat;
    font-size: 0.5px;
    border-radius: 50%;
    animation: blast 1s ease-in infinite;
}
.loader::after {
    font-size: 1px;
    background: var(--accent);
    animation: bounce 1s ease-in infinite;
}
@keyframes bounce {
    0%, 100% { font-size: 0.75px; }
    50% { font-size: 1.5px; }
}
@keyframes blast {
    0%, 40% { font-size: 0.5px; }
    70% { opacity: 1; font-size: 4px; }
    100% { font-size: 6px; opacity: 0; }
}
.table-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .7);
    z-index: 2;
}
/* keep the loader dead-center of the screen, modest size */
.table-overlay .loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2);
}
.table-overlay[hidden] { display: none; }
.table-wrap.loading tbody { opacity: .5; transition: opacity .15s; }

/* pagination */
.grid-heading { font-size: 16px; color: var(--ink); margin: 18px 0 0; padding-left: 4px; border-left: 4px solid var(--gold); padding-left: 10px; }
.grid-heading[hidden] { display: none; }
.grid-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; min-height: 38px; }
.grid-bar-left { display: flex; align-items: center; gap: 18px; padding-left: 16px; }
.grid-bar-left .stat { font-size: 15px; }
.grid-bar-left .stat strong { font-size: 16px; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.pagination:empty { display: none; }
.pagination button {
    min-width: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.pagination button:hover:not(:disabled) { background: #eaf2fb; border-color: var(--accent); }
.pagination button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination button:disabled { opacity: .45; cursor: default; }
.pagination .gap { padding: 0 4px; color: var(--muted); }
