/* 咕咚门店管理系统 - 样式表 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --table-header-bg: #e8f4f8;
}

/* Bootstrap Primary 覆盖 */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主内容区 */
.main-content {
    margin-top: 70px;
    flex: 1;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 600;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    border-radius: 8px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--table-header-bg);
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

/* 金额右对齐 */
.text-money {
    text-align: right;
    font-family: "Courier New", monospace;
    font-weight: 500;
}

/* 利润表专用样式 */
.profit-table {
    border-collapse: collapse;
}

.profit-table th,
.profit-table td {
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.profit-table .category-header {
    background-color: var(--table-header-bg);
    font-weight: 600;
}

.profit-table .section-header {
    background-color: #f1f5f8;
    font-weight: 500;
}

.profit-table .detail-row td:first-child {
    padding-left: 30px;
}

.profit-table .total-row {
    background-color: #fff9e6;
    font-weight: 600;
}

.profit-table .profit-row {
    background-color: #e8f5e9;
    font-weight: 600;
}

.profit-table .highlight-row {
    background-color: #fff3cd;
}

/* 状态徽章 */
.badge-status-active {
    background-color: var(--success-color);
}

.badge-status-inactive {
    background-color: #6c757d;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    text-align: center;
    padding: 30px;
    border-radius: 12px 12px 0 0;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* 统计卡片 */
.stat-card {
    border-radius: 10px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 筛选表单 */
.filter-form {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    margin-bottom: 20px;
}

/* 操作按钮组 */
.btn-action {
    padding: 4px 8px;
    font-size: 0.85rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .main-content {
        margin-top: 56px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .profit-table th,
    .profit-table td {
        padding: 8px 10px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .filter-form,
    .btn,
    .footer {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 表单样式 */
.form-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 动态表格行 */
.dynamic-row {
    transition: background-color 0.2s;
}

.dynamic-row:hover {
    background-color: #f8f9fa;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* 页面标题 */
.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0;
}

/* 月份选择器 */
.month-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.month-selector .btn {
    min-width: 60px;
}

.month-selector .btn.active {
    background-color: var(--primary-color);
    color: white;
}
