/* ============================================================
   布鲁奇维尔销售管理系统 - 样式文件
   Brand colors: Blue #106ABF, Gold #FCAF3B
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Microsoft YaHei', '微软雅黑', sans-serif;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: #106ABF;
    text-decoration: none;
}

a:hover {
    color: #0d5aa0;
    text-decoration: underline;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
    background: linear-gradient(135deg, #106ABF 0%, #0d5aa0 100%);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(16, 106, 191, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.navbar-brand:hover {
    color: #FCAF3B;
    text-decoration: none;
}

.navbar-logo {
    height: 43px;
    width: auto;
    display: block;
    margin-left: -20px;
}

.navbar-title {
    font-family: 'Poppins', 'Microsoft YaHei', '微软雅黑', sans-serif;
    font-weight: bold;
    color: white;
    font-size: 20px;
    margin-left: 15px;
    letter-spacing: 2px;
}

.navbar-nav {
    display: flex;
    gap: 5px;
    list-style: none;
    margin-left: 40px;
}

.navbar-nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
}

/* ============================================================
   主内容区
   ============================================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.page-subtitle {
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

/* ============================================================
   卡片
   ============================================================ */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================================================
   统计卡片
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #106ABF;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card.gold { border-left-color: #FCAF3B; }
.stat-card.green { border-left-color: #28a745; }
.stat-card.orange { border-left-color: #fd7e14; }

.stat-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.stat-value .unit {
    font-size: 14px;
    font-weight: 400;
    color: #888;
    margin-left: 4px;
}

/* ============================================================
   表格
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #f8f9fc;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    border-bottom: 2px solid #e8eaf0;
    white-space: nowrap;
}

tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

tbody tr:hover {
    background: #f8faff;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: #106ABF;
    color: white;
}

.btn-primary:hover {
    background: #0d5aa0;
    color: white;
}

.btn-gold {
    background: #FCAF3B;
    color: #1a1a1a;
}

.btn-gold:hover {
    background: #f5a020;
    color: #1a1a1a;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #555;
}

.btn-outline:hover {
    background: #f5f5f5;
    color: #333;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ============================================================
   表单
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
}

.form-label .required {
    color: #dc3545;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #106ABF;
    box-shadow: 0 0 0 3px rgba(16, 106, 191, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

/* ============================================================
   标签/徽章
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-blue { background: #e3f0fd; color: #106ABF; }
.badge-gold { background: #fff3e0; color: #f5a020; }
.badge-green { background: #e8f5e9; color: #28a745; }
.badge-red { background: #fce4ec; color: #dc3545; }
.badge-gray { background: #f0f0f0; color: #666; }
.badge-orange { background: #fff3e0; color: #fd7e14; }
.badge-purple { background: #f3e5f5; color: #7b1fa2; }

/* ============================================================
   筛选栏
   ============================================================ */
.filter-bar {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-bar .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* ============================================================
   详情页
   ============================================================ */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.detail-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100px;
    color: #888;
    font-size: 13px;
    flex-shrink: 0;
}

.detail-value {
    color: #333;
    font-size: 13px;
    flex: 1;
}

/* ============================================================
   阶段进度条
   ============================================================ */
.stage-progress {
    display: flex;
    gap: 4px;
    margin: 15px 0;
}

.stage-step {
    flex: 1;
    height: 6px;
    background: #e8eaf0;
    border-radius: 3px;
    position: relative;
}

.stage-step.completed {
    background: #106ABF;
}

.stage-step.current {
    background: #FCAF3B;
}

/* ============================================================
   消息提示
   ============================================================ */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.flash-message.error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.flash-message.warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* ============================================================
   空状态
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state .text {
    font-size: 15px;
    margin-bottom: 15px;
}

/* ============================================================
   两栏布局
   ============================================================ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 12px;
    border-top: 1px solid #eee;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-logo {
    height: 18px;
    width: auto;
}

/* ============================================================
   响应式 - 平板 (769px - 1200px)
   ============================================================ */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .navbar-title { font-size: 16px; }
    .navbar-nav a { padding: 8px 10px; font-size: 13px; }
}

/* ============================================================
   响应式 - 手机 (≤768px)
   ============================================================ */
@media (max-width: 768px) {
    /* 全局调整 */
    body { font-size: 13px; }
    
    .container { padding: 10px; }
    
    /* 导航栏优化 - 横向滚动 */
    .navbar {
        padding: 0 10px;
        height: 50px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-brand {
        gap: 8px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .navbar-logo {
        height: 32px;
        margin-left: 0;
    }
    
    .navbar-title {
        font-size: 13px;
        margin-left: 8px;
        letter-spacing: 1px;
        white-space: nowrap;
    }
    
    .navbar-nav {
        gap: 2px;
        flex-shrink: 0;
        margin-left: 15px;
    }
    
    .navbar-nav a {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    .navbar-user {
        flex-shrink: 0;
    }
    
    .user-name {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    /* 页面标题 */
    .page-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .page-title { font-size: 18px; }
    .page-subtitle { font-size: 11px; }
    
    /* 统计卡片 */
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-label { font-size: 11px; }
    .stat-value { font-size: 20px; }
    
    /* 表单 */
    .form-row, .form-row-3 { 
        grid-template-columns: 1fr; 
        gap: 10px;
    }
    
    .form-group { margin-bottom: 10px; }
    .form-label { font-size: 12px; margin-bottom: 4px; }
    .form-control { 
        font-size: 13px; 
        padding: 8px 10px;
        min-height: 36px;
    }
    
    /* 按钮 */
    .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* 表格 - 横向滚动 */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .table th, .table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* 两列/三列布局 */
    .two-col, .three-col { 
        grid-template-columns: 1fr; 
        gap: 15px;
    }
    
    /* 卡片 */
    .card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-title { font-size: 14px; }
    .card-body { padding: 15px; }
    
    /* 详情页 */
    .detail-grid { 
        grid-template-columns: 1fr; 
        gap: 10px;
    }
    
    .detail-item label { font-size: 11px; }
    .detail-item span { font-size: 13px; }
    
    /* 时间线 */
    .timeline { padding-left: 20px; }
    .timeline-item { margin-bottom: 15px; padding-left: 15px; }
    .timeline-dot { left: -18px; width: 12px; height: 12px; }
    .timeline-content { padding: 10px 12px; }
    .timeline-content h4 { font-size: 13px; }
    .timeline-content p { font-size: 12px; }
    
    /* 筛选栏 */
    .filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 页脚 */
    .footer {
        padding: 15px;
        font-size: 11px;
    }
    
    .footer-logo { height: 24px; }
    
    /* 登录页 */
    .login-container {
        width: 90%;
        max-width: 350px;
        padding: 25px 20px;
    }
    
    .login-logo { height: 50px; }
    .login-title { font-size: 18px; }
    
    /* 消息提示 */
    .flash-message {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    /* 徽章 */
    .badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 30px 15px;
    }
    
    .empty-state .icon { font-size: 36px; }
    .empty-state .text { font-size: 13px; }
}

/* ============================================================
   响应式 - 小屏手机 (≤480px)
   ============================================================ */
@media (max-width: 480px) {
    .stats-grid { 
        grid-template-columns: 1fr; 
    }
    
    .navbar-title {
        display: none;
    }
    
    .navbar-nav a {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .page-title { font-size: 16px; }
    
    .btn {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .table th, .table td {
        padding: 6px 4px;
    }
}
