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

:root {
    --primary-color: #0ABAB5;
    --secondary-color: #089B96;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --border-color: #ddd;
    --shadow: 0 4px 20px rgba(10,186,181,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #4DD0D0 0%, #7EDDD8 25%, #B8EAE6 45%, #E0F5F3 65%, #ffffff 85%); background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-color);
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(10,186,181,0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(163,221,217,0.3);
}

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

.logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 5px;
}

.logo .subtitle {
    color: #999;
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.login-form input,
.login-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10,186,181,0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0ABAB5 0%, #089B96 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(10,186,181,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #089B96 0%, #078882 100%);
    box-shadow: 0 6px 20px rgba(10,186,181,0.4);
    transform: translateY(-1px);
}

.form-footer {
    margin-top: 15px;
    text-align: center;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}


/* 主界面布局 */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 20px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #f0f7ff;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

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

.header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    color: var(--text-color);
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.content-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

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

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

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-color);
}

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

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.btn {
    padding: 8px 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

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

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

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

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

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 全局响应式缩放 ========== */
/* 平板设备 - 轻微缩小 */
@media (max-width: 1024px) and (min-width: 769px) {
    html {
        zoom: 0.9;
    }
}

/* 小平板/大手机 - 中等缩小 */
@media (max-width: 768px) and (min-width: 481px) {
    html {
        zoom: 0.8;
    }
}

/* 手机设备 - 较大缩小 */
@media (max-width: 480px) {
    html {
        zoom: 0.65;
    }
}

/* Firefox兼容（Firefox不支持zoom，使用transform替代） */
@supports not (zoom: 1) {
    @media (max-width: 1024px) and (min-width: 769px) {
        html {
            transform: scale(0.9);
            transform-origin: top left;
            width: 111.11%; /* 1/0.9 */
        }
    }
    
    @media (max-width: 768px) and (min-width: 481px) {
        html {
            transform: scale(0.8);
            transform-origin: top left;
            width: 125%; /* 1/0.8 */
        }
    }
    
    @media (max-width: 480px) {
        html {
            transform: scale(0.65);
            transform-origin: top left;
            width: 153.85%; /* 1/0.65 */
        }
    }
}
