* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f6f8fb;
    color: #1f2937;
}

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

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

.nav a {
    margin-right: 14px;
    text-decoration: none;
    color: #2563eb;
}

.nav a.active {
    font-weight: 600;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    padding: 18px;
    margin-bottom: 16px;
}

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

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

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

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

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #4b5563;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 12px;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

button, .btn {
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn.secondary {
    background: #475569;
}

.btn.danger {
    background: #b91c1c;
}

.btn.warn {
    background: #b45309;
}

.flash {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}

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

.record-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 90px 110px 90px auto auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.record-row > * {
    margin: 0;
}

.muted {
    color: #6b7280;
    font-size: 13px;
}

.zone-id {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    max-width: 290px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.domain-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 220px;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

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

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

    .container {
        padding: 0 12px;
    }
}
