* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.container.narrow {
    max-width: 520px;
    margin-top: 80px;
}

h1, h2 {
    margin: 0 0 8px;
}

.muted {
    color: #94a3b8;
    margin-top: 0;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.alert {
    background: #1d4ed8;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 16px;
}

.alert.error {
    background: #b91c1c;
}

label {
    display: block;
    margin: 10px 0 6px;
    font-size: 14px;
}

input, select, button {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #e2e8f0;
}

button, .btn {
    background: #4f46e5;
    border: none;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn.secondary {
    background: #334155;
}

.btn.warning {
    background: #d97706;
}

.btn.danger {
    background: #dc2626;
}

.btn.small, button.small {
    padding: 8px 10px;
    font-size: 12px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px 14px;
    align-items: end;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

th {
    color: #93c5fd;
}

.mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.status {
    border-radius: 999px;
    padding: 4px 8px;
    display: inline-block;
    font-size: 12px;
}

.status.active {
    background: #14532d;
}

.status.paused {
    background: #78350f;
}

.status.revoked {
    background: #7f1d1d;
}

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

@media (max-width: 900px) {
    .grid-form {
        grid-template-columns: 1fr;
    }
}
