/* 考勤管理系统后台样式 - 左侧菜单布局 */
* {
    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;
}

/* 管理布局 */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.logo {
    padding: 1.5rem;
    border-bottom: 1px solid #34495e;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 侧边栏导航 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-title {
    font-size: 0.75rem;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.nav-item.active {
    background: #34495e;
    color: white;
    border-left-color: #3498db;
}

.nav-icon {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

.nav-text {
    font-size: 0.9rem;
}

/* 侧边栏底部 */
.sidebar-footer {
    border-top: 1px solid #34495e;
    padding: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    font-size: 1.2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: #95a5a6;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e74c3c;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.logout-btn:hover {
    background: #c0392b;
    color: white;
}

/* 主内容区域 */
.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.content-header {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #6c757d;
}

.breadcrumb-item {
    position: relative;
}

.breadcrumb-item:not(:last-child):after {
    content: ' / ';
    color: #adb5bd;
    margin: 0 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-time {
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.content-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
}

/* 登录布局 */
.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

/* 容器（保持兼容性） */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
}

.card-body {
    padding: 1.5rem;
}

/* 页面标题与工具栏 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.page-header .actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-card .filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-card .filter-grid .form-group {
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 320px;
}

@supports (display: grid) {
    .filter-card .filter-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }

    .filter-card .filter-grid .form-group {
        min-width: 0;
        max-width: none;
    }
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.summary-item {
    min-width: 160px;
}

.summary-item .label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
}

.summary-item .value {
    font-size: 1.65rem;
    font-weight: 600;
    color: #1b2a47;
    line-height: 1.2;
}

.summary-item .sub {
    font-size: 0.8rem;
    color: #6c757d;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.table-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.table-responsive {
    overflow-x: auto;
}

.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.chart-placeholder {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #6c757d;
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 8px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.note-text {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

.log-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 6px;
    background: white;
    border: 1px solid #e9ecef;
}

.log-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: #eff4ff;
    color: #1a5ad7;
}

.log-content {
    flex: 1;
}

.log-title {
    font-weight: 600;
    color: #1b2a47;
    margin-bottom: 0.35rem;
}

.log-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.35rem;
}

.log-status {
    font-size: 0.8rem;
}

.data-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.data-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #f1f3f5;
}

.data-list-label {
    font-weight: 600;
    color: #1b2a47;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-list-values {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-top: 1px solid #e9ecef;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #d39e00;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #117a8b;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #495057;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

/* 警告框样式 */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    position: relative;
}

.alert-success {
    color: #155724;
    background: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background: #d1ecf1;
    border-color: #bee5eb;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}

.badge-success {
    color: white;
    background: #28a745;
}

.badge-primary {
    color: white;
    background: #007bff;
}

.badge-warning {
    color: #212529;
    background: #ffc107;
}

.badge-danger {
    color: white;
    background: #dc3545;
}

.badge-light {
    color: #495057;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.25rem;
}

.pagination a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #007bff;
    text-decoration: none;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination a.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #adb5bd;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.close:hover {
    color: #495057;
}

/* 工具栏 */
.toolbar {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card,
.stat-card,
.stats-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.metric-card.success,
.stats-card.success,
.stat-card.success {
    border-left-color: #28a745;
}

.metric-card.warning,
.stats-card.warning,
.stat-card.warning {
    border-left-color: #ffc107;
}

.metric-card.danger,
.stats-card.danger,
.stat-card.danger {
    border-left-color: #dc3545;
}

.metric-value,
.stat-value,
.stats-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #495057;
    margin-bottom: 0.5rem;
}

.metric-label,
.stat-label,
.stats-card .label {
    color: #6c757d;
    font-size: 0.9rem;
}

.stat-trend {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.stat-trend.up {
    color: #28a745;
}

.stat-trend.down {
    color: #dc3545;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .content-header {
        padding: 0.75rem 1rem;
    }
    
    .content-body {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 滚动条样式 */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #34495e;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #95a5a6;
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #bdc3c7;
}

/* 特殊按钮样式 */
.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    color: white;
}

.btn-reset-password {
    background: #ffc107;
    color: #212529;
}

.btn-reset-password:hover {
    background: #d39e00;
    color: #212529;
}

.btn-view-map {
    background: #28a745;
    color: white;
}

.btn-view-map:hover {
    background: #1e7e34;
    color: white;
}