/* 全局样式 */
body {
    background-color: #f8f9fa;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 0;
}

.sidebar .list-group-item {
    border: none;
    border-radius: 0;
    padding: 15px 20px;
    transition: all 0.3s;
}

.sidebar .list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.sidebar .list-group-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.sidebar .list-group-item:hover {
    background-color: #f8f9fa;
}

.sidebar .list-group-item.active {
    background-color: #0d6efd;
    color: white;
}

.sidebar .list-group-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 统计卡片样式 */
.stat-card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

/* [已废弃] 请求按钮样式 - 已改用任务系统 */
/*
.request-btn {
    font-weight: bold;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.request-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.request-btn.active-request {
    font-weight: 900 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    position: relative;
}

.request-btn.active-request.btn-primary {
    animation: pulse-blue 2s infinite;
}

.request-btn.active-request.btn-success {
    animation: pulse-green 2s infinite;
}

.request-btn.active-request.btn-danger {
    animation: pulse-red 2s infinite;
}

.request-btn.active-request::before {
    content: '●';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 12px;
    color: #fff;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(13, 110, 253, 0); }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(25, 135, 84, 0); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
}
*/

/* PDF/图片预览 Modal 样式已移除：所有附件直接在新窗口打开 */

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .card-subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.stat-card .card-title {
    font-weight: bold;
    font-size: 2rem;
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f8f9fa;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 状态标签 */
.badge {
    padding: 5px 12px;
    font-weight: normal;
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
    padding: 8px 16px;
    transition: all 0.3s;
}

.btn i {
    margin-right: 5px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.875rem;
}

/* Status Pills 样式 */
.status-pills {
    gap: 8px;
}

.status-pill {
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid;
    position: relative;
}

.status-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.status-pill.active {
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.status-pill .badge {
    font-size: 0.75rem;
    padding: 3px 7px;
    border-radius: 10px;
    font-weight: 600;
}

/* Pills 激活状态颜色 */
.status-pill[data-status=""].active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.status-pill[data-status="PREVIA"].active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.status-pill[data-status="FATURADA"].active {
    background-color: #198754;
    color: white;
    border-color: #198754;
}

.status-pill[data-status="REMOVIDO"].active {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.status-pill[data-status="CANCELADA"].active {
    background-color: #ffc107;
    color: #000;
    border-color: #ffc107;
}

/* 模态框样式 */
.modal-xl {
    max-width: 98% !important;
    margin: 0.5rem auto;
}

.modal-lg {
    max-width: 95% !important;
    margin: 0.5rem auto;
}

.modal-header {
    background-color: #0d6efd;
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 30px;
}

.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 15px 30px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 10px 12px;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 分页样式 */
.pagination {
    margin-top: 20px;
}

.pagination .page-link {
    color: #0d6efd;
    border-radius: 5px;
    margin: 0 3px;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        margin-bottom: 20px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* Pills 响应式 */
    .status-pill {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-bottom: 5px;
    }
    
    .status-pill i {
        display: none;
    }
    
    .status-pill .badge {
        font-size: 0.7rem;
        padding: 2px 5px;
    }
    
    /* 小屏幕模态框优化 */
    .modal-xl,
    .modal-lg {
        max-width: 98% !important;
        margin: 0.25rem auto;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 12px 15px;
    }
    
    .modal-dialog {
        margin: 0.25rem;
    }
    
    /* 表单在小屏幕上的优化 */
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control, .form-select {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 576px) {
    .modal-xl,
    .modal-lg {
        max-width: 100% !important;
        margin: 0;
    }
    
    .modal-dialog {
        margin: 0;
    }
    
    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .modal-footer {
        padding: 10px;
    }
    
    .stat-card .card-title {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 6px 12px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空数据样式 */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Clique para copiar (Detalhes da Nota Fiscal) */
.copyable {
    cursor: pointer;
    border-radius: 2px;
    padding: 0 2px;
}
.copyable:hover {
    background-color: rgba(13, 110, 253, 0.12);
}
