* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.5;
}

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

header {
    margin-bottom: 28px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

header p {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 4px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-err {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

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

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

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="url"],
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-off {
    background: #f1f5f9;
    color: #64748b;
}

.mono {
    font-family: Consolas, monospace;
    font-size: 0.82rem;
    word-break: break-all;
}

.webhook-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}

.webhook-info dt {
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
}

.webhook-info dt:first-child {
    margin-top: 0;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form input {
    margin-bottom: 0;
    flex: 1;
    min-width: 120px;
}

.actions {
    display: flex;
    gap: 6px;
}

.form-row {
    margin-bottom: 0;
}

.hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: -10px;
    margin-bottom: 14px;
}
