:root {
    --bg: #ffffff;
    --panel: #f1f4f8;
    --border: #ccd4df;
    --text: #20293a;
    --muted: #8b98a5;
    --primary: #001a77;
    --accent: #0061fc;
}

* { box-sizing: border-box; }

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

.page-header {
    padding: 32px 40px 16px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: 1.6rem;
    color: var(--primary);
}

.page-header p {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

.page-header a { color: var(--primary); }

.last-update {
    margin-top: 10px;
    font-size: 0.88rem;
}

main { padding: 24px 40px 60px; overflow-x: auto; }

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 0.92rem;
    width: 280px;
    max-width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-input::placeholder { color: var(--muted); }

.firmware-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.92rem;
}

.firmware-table th,
.firmware-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.firmware-table th {
    background: var(--primary);
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.firmware-table tr:last-child td { border-bottom: none; }

.firmware-table tr:hover td { background: rgba(255,255,255,0.02); }

.model {
    font-weight: 600;
    color: var(--primary);
}

.primary {
    color: var(--primary);
}

.row-changed td:first-child { border-left: 3px solid var(--primary); }

.empty {
    text-align: center;
    background-color: var(--panel);
    color: var(--text);
    padding: 40px;
    margin-top: 0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border);
    transition: 0.2s;
    border-radius: 24px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

.switch input:checked + .slider { background-color: var(--accent); }

.switch input:checked + .slider::before { transform: translateX(18px); }

.btn {
    color: white;
    background-color: var(--accent);
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary);
}

.page-title {
    display: flex;
    align-items: center;
    column-gap: 5px;
}

.page-title object {
    width: 33.5px;
    height: 37px;
}

#firmware-table:has(+ #no-results:not([hidden])) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}