/* 公共样式 */

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions .btn {
    margin-left: 0;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.header {
    background-color: #4CAF50;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
}

.header .user-info {
    display: flex;
    align-items: center;
}

.header .user-info a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header .user-info a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 200px;
    background-color: #333;
    color: #fff;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    border-bottom: 1px solid #444;
}

.sidebar ul li a {
    display: block;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar ul li a:hover {
    background-color: #444;
}

.sidebar ul li a.active {
    background-color: #4CAF50;
}

.content {
    flex: 1;
    padding: 30px;
}

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

.content-header h2 {
    color: #333;
}

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

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

.btn-secondary {
    background-color: #666;
}

.btn-secondary:hover {
    background-color: #555;
}

.form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}

.form-actions .btn {
    margin-left: 10px;
}

.table-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

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

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

tr:hover {
    background-color: #f9f9f9;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons a {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.action-buttons .btn-edit {
    background-color: #4CAF50;
    color: #fff;
}

.action-buttons .btn-delete {
    background-color: #f44336;
    color: #fff;
}

.action-buttons .btn-edit:hover {
    background-color: #45a049;
}

.action-buttons .btn-delete:hover {
    background-color: #da190b;
}

.search-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.search-container input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-container .btn {
    border-radius: 0 4px 4px 0;
    margin-left: 0;
}

.status-active {
    color: #4CAF50;
    font-weight: bold;
}

.status-inactive {
    color: #f44336;
    font-weight: bold;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dashboard-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.dashboard-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #4CAF50;
}

.section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.section h2 {
    margin-bottom: 20px;
    color: #333;
}

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

.pagination a {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

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

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