:root {
    --sakura: #F4A7B9;
    --sky: #87CEFA;
    --matcha: #88C27A;
    --cream: #FFF7E8;
    --ink: #1F2933;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
}

/* 布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px;
}

/* 侧边栏 */
.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-header h1 {
    color: var(--sakura);
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover, .nav-item.active {
    background: rgba(244, 167, 185, 0.1);
    border-left-color: var(--sakura);
    color: var(--sakura);
}

.nav-item i {
    width: 20px;
    margin-right: 10px;
}

/* 顶部栏 */
.top-bar {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-radius: 12px;
}

.breadcrumb {
    color: #666;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info a {
    color: var(--ink);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s;
}

.user-info a:hover {
    background: var(--light-gray);
}

/* 卡片 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}

.card-body {
    padding: 30px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sakura);
}

.stat-card.sky::before { background: var(--sky); }
.stat-card.matcha::before { background: var(--matcha); }

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--ink);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--ink);
}

tr:hover {
    background: rgba(135, 206, 250, 0.05);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--sakura);
    color: white;
}

.btn-primary:hover {
    background: #e296a7;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--sky);
    color: white;
}

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

.btn-success {
    background: var(--matcha);
    color: white;
}

.btn-success:hover {
    background: #7ab56c;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--sakura);
    color: var(--sakura);
}

.btn-outline:hover {
    background: var(--sakura);
    color: white;
}

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

.btn-group {
    display: flex;
    gap: 10px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--ink);
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"],
input[type="datetime-local"],
select, 
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--sakura);
}

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

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(136, 194, 122, 0.2);
    color: var(--matcha);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.badge-info {
    background: rgba(135, 206, 250, 0.2);
    color: var(--sky);
}

/* 警告框 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(136, 194, 122, 0.1);
    border-color: var(--matcha);
    color: #155724;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background: rgba(135, 206, 250, 0.1);
    border-color: var(--sky);
    color: #0c5460;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box input {
    flex: 1;
    min-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--sakura);
    box-shadow: 0 0 0 3px rgba(244, 167, 185, 0.1);
}

.search-box form {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box .btn {
    white-space: nowrap;
    min-width: auto;
}

/* 批量操作 */
.btn-xs {
    padding: 2px 6px;
    font-size: 11px;
}

/* 登录页面 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--cream);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--sakura);
    margin-bottom: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .search-box {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box input {
        min-width: auto;
        width: 100%;
    }
    
    .search-box form {
        flex-direction: column;
        gap: 15px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }