:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f3f6fb;
}

body {
    margin: 0;
    min-width: 1200px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px;
    background: #111827;
    color: white;
}

.topbar h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.topbar p {
    margin: 0;
    color: #cbd5e1;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.url {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.error {
    color: #b91c1c;
}

.container {
    max-width: none;
    margin: 32px 0;
    padding: 0 32px;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgb(15 23 42 / 8%);
    overflow-x: auto;
}

.card.narrow {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px;
}

.login-card {
    max-width: 420px !important;
}

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

th, td {
    padding: 18px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

th {
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}

small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    max-width: 360px;
    white-space: normal;
}

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    color: #1f2937;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    min-height: 36px;
    padding: 0 12px;
    text-decoration: none;
}

button.primary, .button.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
}

button.danger {
    border-color: #fecaca;
    color: #b91c1c;
}

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

.actions form {
    margin: 0;
}

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.badge.on {
    background: #dcfce7;
    color: #166534;
}

.badge.off {
    background: #fee2e2;
    color: #991b1b;
}

.badge.type {
    background: #e0f2fe;
    color: #075985;
}

.badge.type.ssl {
    background: #fef3c7;
    color: #92400e;
}

.muted {
    color: #94a3b8;
}

.notice {
    margin-bottom: 20px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 14px 16px;
}

.empty {
    padding: 56px;
    text-align: center;
}

.empty.compact {
    padding: 24px;
}

.form {
    display: grid;
    gap: 20px;
}

.form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

input, textarea, select {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    padding: 11px 12px;
}

textarea {
    resize: vertical;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.checkbox {
    align-items: center;
    display: flex !important;
    gap: 10px !important;
}

.checkbox input {
    width: auto;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

@media (max-width: 900px) {
    .topbar, .grid {
        grid-template-columns: 1fr;
        display: grid;
        gap: 18px;
    }
}
