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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    color: #e74c3c;
    text-decoration: none;
}

a:hover {
    color: #c0392b;
}

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

.btn {
    display: inline-block;
    padding: 8px 20px;
    background: #e74c3c;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 4px 12px;
    font-size: 12px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

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

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

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

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

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9fa;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination .current {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    margin-bottom: 20px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar .logo {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

.navbar .nav-links a {
    margin-left: 20px;
    color: #555;
}

.navbar .nav-links a:hover {
    color: #e74c3c;
}

/* 登录页 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #e74c3c;
}

.login-box .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 首页 */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.portal-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.portal-card:hover {
    transform: translateY(-5px);
}

.portal-card .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

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

.portal-card p {
    color: #666;
    margin-bottom: 20px;
}

/* 客户卡片 */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.client-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.client-card:hover {
    transform: translateY(-3px);
}

.client-card .photo {
    width: 100%;
    height: 250px;
    background: #f0f0f0;
    background-size: cover;
    background-position: center;
}

.client-card .info {
    padding: 15px;
}

.client-card .name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.client-card .meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

/* 详情页 */
.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.detail-header .photo {
    width: 200px;
    height: 250px;
    background: #f0f0f0;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-item .label {
    color: #888;
    font-size: 14px;
    margin-bottom: 3px;
}

.detail-item .value {
    font-size: 16px;
}

/* 二维码 */
.qr-box {
    text-align: center;
    padding: 20px;
}

.qr-box img {
    max-width: 200px;
    margin: 10px 0;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-bar input, .search-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 5px;
}

.stat-card .label {
    color: #888;
}
