* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, sans-serif;
}

body {
    background: #020617;
    color: #fff;
    min-height: 100vh;
    padding: 32px 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.narrow {
    max-width: 560px;
}

.card {
    background: #111827;
    border: 1px solid #233047;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    margin-bottom: 24px;
    padding: 28px;
}

.app-header,
.topbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

h1 {
    font-size: 28px;
    line-height: 1.2;
}

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

h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.muted {
    color: #9ca3af;
    font-size: 15px;
    margin: 8px 0 18px;
}

.small {
    color: #94a3b8;
    font-size: 13px;
}

.app-subtitle {
    color: #9ca3af;
    font-size: 15px;
    font-weight: 700;
    margin-top: 6px;
}

.user-pill {
    color: #9ca3af;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.stack {
    display: grid;
    gap: 16px;
}

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

.form-group {
    display: grid;
    gap: 8px;
}

label {
    color: #cbd5e1;
    font-size: 14px;
}

input,
select {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    min-height: 46px;
    padding: 12px;
    width: 100%;
}

input[type="checkbox"] {
    min-height: 0;
    width: auto;
}

input[readonly] {
    background: #334155;
    cursor: not-allowed;
}

button,
.button {
    align-items: center;
    background: #2563eb;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 11px 16px;
    text-decoration: none;
}

button:hover,
.button:hover {
    background: #1d4ed8;
}

.button.secondary {
    background: #334155;
}

.button.danger,
button.danger {
    background: #ef1f25;
}

.button.active {
    background: #3b4a60;
}

.button.create {
    background: #2f65f4;
}

.inline-form {
    display: inline;
}

.success,
.alert {
    border-radius: 6px;
    margin-bottom: 18px;
    padding: 14px;
}

.success {
    background: #14532d;
}

.alert {
    background: #7f1d1d;
}

.terminal {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #22c55e;
    font-family: monospace;
    font-size: 13px;
    overflow: auto;
    padding: 18px;
    white-space: pre-wrap;
}

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

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

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

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

td {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 400;
}

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

.section-head h2 {
    margin-bottom: 18px;
}

.section-head .muted {
    margin-bottom: 0;
}

.table-actions {
    min-width: 180px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

details {
    margin-top: 8px;
}

summary {
    color: #93c5fd;
    cursor: pointer;
}

pre {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #d1fae5;
    font-size: 12px;
    margin-top: 10px;
    max-height: 300px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

@media (max-width: 720px) {
    body {
        padding: 20px 12px;
    }

    .card {
        padding: 20px;
    }

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

    h1 {
        font-size: 28px;
    }

    .app-header,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-subtitle,
    .user-pill,
    .muted {
        font-size: 15px;
    }

    .section-head {
        flex-direction: column;
    }
}
