/* static/css/dashboard.css */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

/* 登录/注册页面 */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-box h1 {
    font-size: 24px;
    color: #1890ff;
    margin-bottom: 8px;
    text-align: center;
}

.auth-box h2 {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #333;
}

.form-group input {
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1890ff;
}

.btn-primary {
    padding: 12px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #40a9ff;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.auth-footer a {
    color: #1890ff;
}

.form-errors {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.form-errors .error {
    color: #ff4d4f;
    font-size: 13px;
    margin: 4px 0;
}

.messages {
    margin-bottom: 16px;
}

.message {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.message.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.message.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.message.info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

/* 后台布局 */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background: #001529;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #002140;
}

.sidebar-header h1 {
    font-size: 18px;
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 12px;
    color: #aaa;
}

.nav-menu {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.nav-menu li {
    margin: 4px 0;
}

.nav-menu li a {
    display: block;
    padding: 12px 20px;
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-menu li a:hover {
    color: white;
    background: #1890ff;
}

.nav-menu li.active a {
    color: white;
    background: #1890ff;
}

.sidebar-footer {
    padding: 20px;
}

.logout-btn {
    display: block;
    padding: 10px;
    color: #aaa;
    text-decoration: none;
    text-align: center;
    border: 1px solid #444;
    border-radius: 6px;
    transition: all 0.3s;
}

.logout-btn:hover {
    color: white;
    border-color: #ff4d4f;
}

.content {
    flex: 1;
    padding: 24px;
    background: #f0f2f5;
}

.content-header {
    margin-bottom: 24px;
}

.content-header h2 {
    font-size: 20px;
    color: #333;
}

/* 统计卡片 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 32px;
}

.stat-content h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* 快速操作 */
.quick-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.quick-actions h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.action-cards {
    display: flex;
    gap: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #f0f2f5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.action-card:hover {
    background: #e6f7ff;
}

.action-card .icon {
    font-size: 24px;
}

.action-card .text {
    font-size: 14px;
}

/* 信息表格 */
.merchant-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.merchant-info h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.info-table {
    width: 100%;
}

.info-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.info-table td:first-child {
    color: #666;
    width: 120px;
}

/* 响应式 */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        width: 60px;
    }

    .sidebar-header h1, .sidebar-header p,
    .nav-menu li a span {
        display: none;
    }
}.badge { background: #ff4d4f; color: white; padding: 2px 8px; border-radius: 10px; font-size: 12px; margin-left: 8px; }
