/* web/static/styles.css */
:root {
    --bg: #0b0d10;
    --fg: #e8e9eb;
    --muted: #9aa0a6;
    --card: #14171a;
    --border: #24292e;
    --btn: #2d7ef7;
    --btn2: #39424c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
}

a,
button {
    cursor: pointer;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.container {
    max-width: 900px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.hidden {
    display: none;
}

.muted {
    color: var(--muted);
    margin-left: 12px;
}

.row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0f1317;
    color: var(--fg);
}

button {
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--btn);
    color: white;
    font-weight: 600;
}

button.secondary {
    background: var(--btn2);
}

.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.device-row .serial {
    background: #233349;
    color: #cfe1ff;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
}

.device-row .meta {
    color: var(--muted);
}

.device-details {
    margin-top: 10px;
    padding: 10px;
    background: #0f1317;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.records {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.record-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.record-row .kv {
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-row .kv span {
    width: 100px;
    color: var(--muted);
}

code {
    background: #0b0f13;
    padding: 2px 6px;
    border-radius: 6px;
}

.actions {
    display: flex;
    gap: 8px;
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

button.small {
    padding: 6px 10px;
    font-weight: 600;
    border-radius: 8px;
}

button.danger {
    background: #8a2a2a;
}

.record-row.edit input,
.record-row.edit select {
    background: #0b0f13;
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
}