* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #20252b;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.login-card {
    width: min(420px, calc(100% - 32px));
}

h1 {
    margin-top: 0;
}

label {
    display: block;
    margin: 16px 0 6px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd1d7;
    border-radius: 6px;
    font-size: 16px;
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: 0;
    border-radius: 6px;
    background: #1f2937;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.error {
    padding: 10px 12px;
    margin: 15px 0;
    border-radius: 6px;
    background: #fde8e8;
    color: #9b1c1c;
}

.muted {
    color: #6b7280;
}

.topbar {
    min-height: 58px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: #1f2937;
    color: white;
}

.topbar a {
    color: white;
}

.topbar span {
    margin-left: auto;
    color: #d1d5db;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 32px auto;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.device-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
}

.device-card:hover {
    border-color: #9ca3af;
}

.device-title {
    font-size: 20px;
    font-weight: bold;
}

.device-id {
    margin: 6px 0 20px;
    color: #6b7280;
}

.device-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    border-top: 1px solid #eef0f2;
    font-size: 14px;
}

.ok {
    color: #15803d;
}

.disabled {
    color: #b91c1c;
}

.back {
    display: inline-block;
    margin-bottom: 16px;
}

.device-header {
    margin-bottom: 24px;
}

.table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e0e4e8;
    border-radius: 10px;
}

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

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
}

pre {
    max-width: 400px;
    white-space: pre-wrap;
    word-break: break-word;
}


/* ===== ДОБАВЛЕНО: страницы прошивок (firmware.php, boards.php, board.php) ===== */

.warn {
    color: #b45309;
}

.notice {
    padding: 10px 12px;
    margin: 15px 0;
    border-radius: 6px;
    background: #e7f6ec;
    color: #166534;
}

select,
input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd1d7;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
}

label.check {
    font-weight: normal;
}

label.check input {
    width: auto;
    margin-right: 8px;
}

form.inline {
    display: inline;
}

form.inline select {
    width: auto;
    padding: 4px 6px;
    font-size: 14px;
}

button.link {
    width: auto;
    margin: 0 0 0 8px;
    padding: 0;
    background: none;
    color: #b91c1c;
    font-size: 14px;
    text-decoration: underline;
}

.kv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px 24px;
    margin-top: 16px;
}

.kv div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-top: 1px solid #eef0f2;
    font-size: 14px;
}

.kv span {
    color: #6b7280;
}

code {
    font-size: 13px;
}
