/* 仓库管理系统 - 全局样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f6fa;
    color: #333;
    line-height: 1.6;
}

/* 登录页 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #888;
    font-size: 14px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand a {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    margin-left: 30px;
    gap: 5px;
    flex: 1;
}

.nav-link {
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f0f0f0;
    color: #333;
}

.nav-link.active {
    background: #667eea;
    color: #fff;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user {
    font-size: 14px;
    color: #666;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 24px;
}

.text-muted {
    color: #888;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    background: #f0f0f0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-text {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
}

.btn-text:hover {
    background: #f0f0f0;
}

.btn-danger {
    color: #dc3545;
}

.btn-danger:hover {
    background: #ffeaea;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-icon {
    font-size: 36px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 14px;
    color: #888;
}

.stat-success .stat-icon { color: #22c55e; }
.stat-warning .stat-icon { color: #f59e0b; }
.stat-danger .stat-icon { color: #ef4444; }

/* 今日统计 */
.today-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.today-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    color: #fff;
    text-align: center;
}

.today-card h3 {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 10px;
}

.today-value {
    font-size: 36px;
    font-weight: bold;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 15px;
}

.card-body {
    padding: 20px;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table .text-center {
    text-align: center;
}

.text-success { color: #22c55e; font-weight: 600; }
.text-danger { color: #ef4444; font-weight: 600; }

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary { background: #e0e7ff; color: #4338ca; }
.badge-secondary { background: #f3f4f6; color: #6b7280; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-warning { background: #fef3c7; color: #d97706; }

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-inline .form-control {
    width: auto;
    min-width: 120px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* 提示框 */
.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* 分页 */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination a.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tabs a {
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
}

.tabs a:hover {
    color: #333;
}

.tabs a.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* 导出卡片 */
.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.export-card {
    display: block;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.export-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102,126,234,0.15);
    transform: translateY(-2px);
}

.export-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.export-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.export-desc {
    font-size: 13px;
    color: #999;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-success {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.btn-success:hover {
    background: #16a34a;
    color: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }

    .navbar-menu {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        overflow-x: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .today-stats {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}
