/*
 * ========================================================================
 * site.css - 衡阳广康业务管理系统全局样式表
 * 说明：采用蓝紫色渐变顶部栏，深色左侧菜单，白色内容区域
 * ========================================================================
 */

/* ========== 全局重置与基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    font-size: 14px;
    overflow-x: hidden;
}

/* ========== 顶部导航栏 ========== */
.navbar-top {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.navbar-top .navbar-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-top .navbar-brand i {
    font-size: 24px;
}

.navbar-top .navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255,255,255,0.9);
}

.navbar-top .navbar-right .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.navbar-top .navbar-right .user-info i {
    font-size: 18px;
}

/* ========== 导航栏下拉菜单 ========== */
.navbar-top .navbar-right .dropdown-nav { position: relative; display: inline-block; }
.navbar-top .navbar-right .dropdown-toggle-nav { cursor: pointer; padding-bottom: 14px; }
.navbar-top .navbar-right .dropdown-nav::after {
    content: ''; display: block; position: absolute; top: 100%; left: 0; right: 0;
    height: 16px; z-index: 999;
}
.navbar-top .navbar-right .dropdown-menu-nav {
    display: none; position: absolute; right: 0; top: calc(100% + 14px); z-index: 1000;
    min-width: 160px; background: #fff; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    padding: 6px 0;
}
.navbar-top .navbar-right .dropdown-nav:hover .dropdown-menu-nav { display: block; }
.navbar-top .navbar-right .dropdown-menu-nav a {
    display: block; padding: 8px 18px; color: #333; text-decoration: none;
    font-size: 14px; white-space: nowrap;
}
.navbar-top .navbar-right .dropdown-menu-nav a:hover { background: #f0f0f0; }
.navbar-top .navbar-right .dropdown-menu-nav a i { margin-right: 6px; width: 16px; text-align: center; }

/* ========== 左侧菜单栏 ========== */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #2c3e50;
    overflow-y: auto;
    z-index: 1020;
    transition: all 0.3s;
}

.sidebar .nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(102, 126, 234, 0.3);
    border-left: 3px solid #667eea;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar .nav-link .menu-icon {
    width: 20px;
    text-align: center;
}

/* 折叠菜单样式 */
.sidebar .nav-item .collapse-menu {
    background: rgba(0,0,0,0.15);
}

.sidebar .nav-item .collapse-menu .nav-link {
    padding-left: 50px;
    font-size: 13px;
}

.sidebar .nav-item .collapse-menu .nav-link i {
    font-size: 14px;
}

/* ========== 主体内容区域 ========== */
.main-content {
    margin-left: 220px;
    margin-top: 56px;
    padding: 20px;
    min-height: calc(100vh - 56px);
}

/* ========== 页面标题区域 ========== */
.page-header {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.page-header h4 i {
    margin-right: 8px;
    color: #667eea;
}

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

.search-bar .form-group {
    margin-bottom: 0;
}

.search-bar label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.search-bar .form-control, .search-bar .form-control-sm {
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.search-bar .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.15);
}

/* ========== 统计卡片 ========== */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

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

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

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 3px;
}

.stat-card .stat-change.up {
    color: #27ae60;
}

.stat-card .stat-change.down {
    color: #e74c3c;
}

.stat-card.stat-blue {
    border-left-color: #667eea;
}

.stat-card.stat-green {
    border-left-color: #27ae60;
}

.stat-card.stat-orange {
    border-left-color: #f39c12;
}

.stat-card.stat-red {
    border-left-color: #e74c3c;
}

/* ========== 数据表格 ========== */
.table-container {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-container .table-header {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}

.table-container .table-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 12px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.table thead th:hover {
    background: #eef0f3;
}

.table thead th .sort-icon {
    margin-left: 4px;
    font-size: 11px;
    color: #aaa;
}

.table tbody td {
    padding: 8px 12px;
    font-size: 13px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(102,126,234,0.05);
}

/* ========== 状态标签 ========== */
.badge-status {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    display: inline-block;
}

.badge-status-success {
    background: #d4edda;
    color: #155724;
}

.badge-status-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-status-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-status-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-status-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* ========== 分页控件 ========== */
.pagination-bar {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #eee;
    background: #fafbfc;
}

.pagination-bar .page-info {
    font-size: 13px;
    color: #666;
}

.pagination-bar .pagination {
    margin: 0;
}

.pagination-bar .page-link {
    padding: 6px 12px;
    font-size: 13px;
    color: #667eea;
    border: 1px solid #dee2e6;
}

.pagination-bar .page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
}

/* ========== 热门产品卡片 ========== */
.product-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s;
    margin-bottom: 20px;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.product-card .product-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.product-card .product-icon i {
    font-size: 28px;
    color: #fff;
}

.product-card .product-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.product-card .product-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
}

/* ========== 图表容器 ========== */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.chart-container .chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .sidebar.show {
        width: 220px;
    }
    .main-content {
        margin-left: 0;
    }
    .search-bar .form-group {
        margin-bottom: 10px;
    }
}

/* ========== 登录页记住我 ========== */
.login-card .remember-row {
    margin-bottom: 20px;
}

.login-card .remember-row input[type="checkbox"] {
    float: none;
    margin-right: 6px;
    margin-top: 0;
    vertical-align: middle;
}

.login-card .remember-row label {
    font-size: 13px;
    color: #888;
    vertical-align: middle;
    cursor: pointer;
}

/* ========== 实时订单区域 ========== */
.realtime-orders {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.realtime-orders .realtime-header {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.realtime-orders .realtime-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.realtime-orders .realtime-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.realtime-orders .realtime-item {
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.realtime-orders .realtime-item:hover {
    background: rgba(102,126,234,0.05);
}

.realtime-orders .realtime-item .order-info {
    flex: 1;
}

.realtime-orders .realtime-item .order-info .order-merchant {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.realtime-orders .realtime-item .order-info .order-detail {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.realtime-orders .realtime-item .order-amount {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
}

/* ========== 按钮样式覆盖 ========== */
.btn-primary {
    background: #667eea;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
}

.btn-warning {
    background: #f39c12;
    border-color: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background: #e08e0b;
    border-color: #e08e0b;
    color: #fff;
}

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

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-card .login-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
}

.login-card .login-title span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-control {
    height: 45px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 0 15px;
}

.login-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.15);
}

.login-card .btn-login {
    width: 100%;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-card .btn-login:hover {
    opacity: 0.9;
}

.login-card .login-footer {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 20px;
}

/* ========== 表格滚动容器 ========== */
.table-scroll {
    overflow-x: auto;
}

.table-scroll .table {
    min-width: 1200px;
}

/* ========== 导出提示消息 ========== */
.alert-fixed {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    min-width: 250px;
}
