/* 
 * 团队业绩管理系统 - 样式表
 * 现代简约风格
 */

/* 全局样式 */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f5f7fb;
    --card-bg: #ffffff;
    --text-color: #495057;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #3a56c5;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* 登录页样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #fff;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 5px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a56c5;
    border-color: #3a56c5;
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* 登录页按钮 */
.login-box .btn {
    width: 100%;
}

/* 添加按钮样式 */
.toolbar .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

/* 布局样式 */
.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: #fff;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary-color);
}

.sidebar-menu a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    transition: var(--transition);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    margin-bottom: 0.5rem;
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.card-header-with-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-header-with-summary h3 {
    margin-bottom: 0;
}

.card-header-summary {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.text-muted {
    color: var(--secondary-color);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color);
}

/* 表格样式 */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
}

.table tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* 搜索框样式 */
.search-box {
    display: flex;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-box .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 警告框样式 */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 5px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    justify-content: center;
}

.pagination li {
    margin: 0 0.25rem;
}

.pagination a {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
}

.pagination a:hover {
    background-color: var(--light-color);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }
    
    .content {
        margin-left: 0;
    }
    
    .sidebar.active {
        width: 250px;
        transform: translateX(0);
    }
    
    .content.active {
        margin-left: 250px;
    }
    
    .toolbar {
        flex-direction: column;
    }
    
    .toolbar > * {
        margin-bottom: 1rem;
    }
}

/* 错误消息样式 */
.error-message {
    color: var(--danger-color);
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

/* 仪表盘卡片样式 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-card-footer {
    margin-top: auto;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 80%;
    max-width: 600px;
    animation: modalFadeIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 加载动画 */
.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 状态徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-info {
    background-color: var(--info-color);
}

/* 数据统计页 - 类似支付宝账单筛选 */
.statistics-filter-card {
    margin-bottom: 1.5rem;
}

.statistics-filter-form .filter-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.statistics-filter-form .filter-tab {
    padding: 0.6rem 1.25rem;
    border: none;
    background: none;
    color: var(--secondary-color);
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition);
}

.statistics-filter-form .filter-tab:hover {
    color: var(--primary-color);
}

.statistics-filter-form .filter-tab.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom-color: var(--primary-color);
}

.statistics-filter-form .filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.statistics-filter-form .filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.statistics-filter-form .filter-row label {
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

.statistics-filter-form .filter-row select,
.statistics-filter-form .filter-row input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}

.statistics-filter-form .filter-sep {
    color: var(--secondary-color);
    margin: 0 0.25rem;
}

.statistics-filter-form .filter-row.hidden {
    display: none !important;
}

.statistics-summary {
    margin-bottom: 1.5rem;
}

.statistics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.statistics-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.statistics-list-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.statistics-list-item:last-child {
    border-bottom: none;
}

.statistics-list-item .stat-date {
    color: var(--text-color);
    font-weight: 500;
}

.statistics-list-item .stat-info {
    color: var(--primary-color);
    font-weight: 600;
} 