* {
    box-sizing: border-box;
}

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

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

h1, h2 {
    margin: 0;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

p {
    margin: 8px 0 0;
}

.panel {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(20, 33, 45, 0.04);
}

.login-panel {
    max-width: 460px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 14px;
    font-weight: 700;
}

input, select, button, .small-button {
    border-radius: 6px;
    font: inherit;
}

input, select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #c8d2dc;
    background: #fff;
}

textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #c8d2dc;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    resize: vertical;
}

.advanced {
    margin-top: 16px;
}

button, .small-button {
    border: 0;
    background: #1d6fd6;
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

button:hover, .small-button:hover {
    background: #155cb4;
}

.ghost {
    background: #ffffff;
    color: #1d3348;
    border: 1px solid #c8d2dc;
}

.secondary {
    background: #334155;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert.error {
    background: #fee2e2;
    color: #7f1d1d;
}

.alert.ok {
    background: #dcfce7;
    color: #14532d;
}

.vehicle {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    margin-bottom: 10px;
}

.vehicle.active {
    border-color: #1d6fd6;
    background: #eff6ff;
}

.vehicle span, .vehicle code {
    display: block;
    margin-top: 5px;
    color: #5c6b7a;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.inline-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.details {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 8px 12px;
}

.details dt {
    font-weight: 700;
    color: #334155;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.muted {
    color: #65758b;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    color: #334155;
    font-size: 13px;
}

@media (max-width: 760px) {
    .topbar, .grid, .inline-actions {
        display: block;
    }

    .panel {
        margin-bottom: 16px;
    }

    .command-grid {
        grid-template-columns: 1fr;
    }

    .inline-actions button {
        width: 100%;
        margin-top: 10px;
    }
}
