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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-box select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

table th, table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 13px;
}

table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

table tr:hover {
    background-color: #f5f5f5;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-待领养 {
    background-color: #ffc107;
    color: #212529;
}

.status-已领养 {
    background-color: #28a745;
    color: white;
}

.status-治疗中 {
    background-color: #dc3545;
    color: white;
}

.status-康复中 {
    background-color: #17a2b8;
    color: white;
}

.status-已放归 {
    background-color: #6c757d;
    color: white;
}

.status-已死亡 {
    background-color: #343a40;
    color: white;
}

.checkbox-cell {
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

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

.actions .btn {
    padding: 5px 10px;
    font-size: 12px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
        border-radius: 4px;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .header-actions > div {
        text-align: center;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }
    
    .header-actions .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input,
    .search-box select {
        width: 100%;
        margin-bottom: 10px;
    }
    
    table {
        font-size: 12px;
    }
    
    table th, table td {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    table th:nth-child(n+6),
    table td:nth-child(n+6) {
        display: none;
    }
    
    .actions {
        flex-wrap: wrap;
    }
    
    .actions .btn {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .checkbox-item {
        padding: 5px 0;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: white;
    }
    
    table tbody tr::before {
        content: attr(data-name);
        display: block;
        font-weight: bold;
        color: #333;
        margin-bottom: 8px;
        padding-bottom: 5px;
        border-bottom: 1px solid #eee;
    }
    
    table tbody td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
        font-size: 13px;
    }
    
    table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #666;
        margin-right: 10px;
        display: inline-block;
        min-width: 80px;
    }
    
    table tbody td:last-child {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
    
    table tbody td:last-child::before {
        display: none;
    }
    
    .actions {
        justify-content: center;
        gap: 10px;
    }
    
    .actions .btn {
        flex: 1;
        min-width: 60px;
        padding: 8px 12px;
    }
    
    .status-badge {
        display: inline-block;
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .checkbox-cell img {
        width: 40px;
        height: 40px;
    }
}
