/**
 * 钾肥供应链系统 - 自定义样式
 */

/* 全局 */
body {
    padding-top: 50px;
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    font-size: 14px;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 51px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: block;
    padding: 20px 0;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #2c3e50;
    border-right: 1px solid #23303d;
}

.sidebar .nav-sidebar {
    margin-right: -1px;
    margin-bottom: 0;
}

.sidebar .nav-sidebar > li > a {
    padding: 12px 20px;
    color: #bdc3c7;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-sidebar > li > a:hover {
    color: #fff;
    background-color: #34495e;
    border-left-color: #3498db;
}

.sidebar .nav-sidebar > li > a .glyphicon {
    margin-right: 8px;
    font-size: 14px;
}

.sidebar .nav-sidebar > li.active > a,
.sidebar .nav-sidebar > li.active > a:hover,
.sidebar .nav-sidebar > li.active > a:focus {
    color: #fff;
    background-color: #2980b9;
    border-left-color: #3498db;
}

/* 主内容区 */
.main-content {
    padding: 20px;
    margin-left: 16.6667%;
    min-height: calc(100vh - 51px - 60px);
}

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.stat-card.success { border-left-color: #27ae60; }
.stat-card.warning { border-left-color: #f39c12; }
.stat-card.danger { border-left-color: #e74c3c; }
.stat-card.info { border-left-color: #3498db; }

.stat-card .stat-title {
    color: #95a5a6;
    font-size: 13px;
    margin-bottom: 5px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-card .stat-icon {
    float: right;
    font-size: 40px;
    color: #ecf0f1;
    margin-top: -10px;
}

/* 面板样式 */
.panel {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.panel-heading {
    font-weight: bold;
}

/* 表格 */
.table > thead > tr > th {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.table-hover > tbody > tr:hover {
    background-color: #f5f7fa;
}

/* 登录页 */
.login-page {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.login-box .login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-box .login-header h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.login-box .login-header p {
    color: #95a5a6;
    font-size: 14px;
}

.login-box .form-control {
    height: 44px;
    border-radius: 4px;
}

.login-box .btn-login {
    width: 100%;
    height: 44px;
    font-size: 16px;
    border-radius: 4px;
}

/* 商品卡片 */
.goods-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

.goods-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.goods-card .goods-name {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goods-card .goods-price {
    font-size: 20px;
    color: #e74c3c;
    font-weight: bold;
}

.goods-card .goods-price small {
    font-size: 12px;
    color: #95a5a6;
    font-weight: normal;
}

.goods-card .goods-info {
    color: #95a5a6;
    font-size: 12px;
    margin-top: 8px;
}

/* 底部 */
.footer {
    margin-left: 16.6667%;
    padding: 15px 0;
    background-color: #fff;
    border-top: 1px solid #eee;
}

/* 徽章 */
.badge-warning {
    background-color: #e74c3c;
}

/* 页面标题 */
.page-header {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.page-header h3 {
    margin: 0;
    color: #2c3e50;
}

.page-header h3 .glyphicon {
    margin-right: 8px;
}

/* 搜索栏 */
.search-bar {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        padding: 10px 0;
    }
    .main-content {
        margin-left: 0;
    }
    .footer {
        margin-left: 0;
    }
    .stat-card .stat-value {
        font-size: 22px;
    }
}

/* 状态标签 */
.label-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* 操作按钮组 */
.btn-group-actions .btn {
    padding: 3px 8px;
    font-size: 12px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state .glyphicon {
    font-size: 60px;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    font-size: 16px;
}
