/* 现代化苹果风格CSS */

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --info-color: #5AC8FA;
    --light-gray: #F2F2F7;
    --medium-gray: #8E8E93;
    --dark-gray: #1C1C1E;
    --white: #FFFFFF;
    --border-radius: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: var(--white);
}

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

.card-header {
    background: var(--white);
    border-bottom: 1px solid #E5E5EA;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: #0056D6;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.btn-warning {
    background: var(--warning-color);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 表单样式 */
.form-control, .form-select {
    border: 1px solid #E5E5EA;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

/* 导航栏样式 */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* 反馈处理红色标样式 - 显示在右上角 */
.nav-link .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
}

/* 表格样式 */
.table {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: #F8F9FA;
    border: none;
    font-weight: 600;
    color: var(--dark-gray);
    padding: 16px;
}

.table tbody td {
    border: none;
    border-top: 1px solid #F2F2F7;
    padding: 16px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #F8F9FA;
}

/* 徽章样式 */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 6px 12px;
}

.badge.bg-success {
    background: var(--success-color) !important;
}

.badge.bg-warning {
    background: var(--warning-color) !important;
}

.badge.bg-danger {
    background: var(--danger-color) !important;
}

.badge.bg-info {
    background: var(--info-color) !important;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: #1F6B3A;
}

.alert-danger {
    background: rgba(255, 59, 48, 0.1);
    color: #C5282F;
}

.alert-warning {
    background: rgba(255, 149, 0, 0.1);
    color: #B25000;
}

.alert-info {
    background: rgba(90, 200, 250, 0.1);
    color: #1C7ED6;
}

/* 统计卡片 */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-2px);
}

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stats-card .stats-label {
    font-size: 16px;
    opacity: 0.9;
}

/* 二维码样式 */
.qr-code-container {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.qr-code-container img {
    max-width: 200px;
    border-radius: 8px;
}

/* 图片预览 */
.image-preview {
    display: inline-block;
    margin: 5px;
    position: relative;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #E5E5EA;
}

.image-preview .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 投诉表单样式 */
.complaint-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.complaint-type-buttons .btn {
    padding: 16px 24px;
    margin: 8px;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
}

/* 分页样式 */
.pagination .page-link {
    border: 1px solid #E5E5EA;
    color: var(--primary-color);
    border-radius: 8px;
    margin: 0 2px;
    padding: 8px 12px;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #E5E5EA;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #E5E5EA;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 通知徽章动画 */
.notification-badge {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .card {
        margin-bottom: 16px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .stats-card .stats-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 14px;
    }
}

/* 投诉状态颜色 */
.status-pending {
    color: var(--warning-color);
}

.status-resolved {
    color: var(--success-color);
}

.type-complaint {
    color: var(--danger-color);
}

.type-service {
    color: var(--info-color);
}

/* 文件上传区域 */
.file-drop-area {
    border: 2px dashed #E5E5EA;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    background: #F8F9FA;
    transition: var(--transition);
}

.file-drop-area:hover,
.file-drop-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
}

.file-drop-area i {
    font-size: 3rem;
    color: var(--medium-gray);
    margin-bottom: 16px;
}

/* AI建议框 */
.ai-suggestion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.ai-suggestion h6 {
    margin-bottom: 12px;
    font-weight: 600;
}

.ai-suggestion p {
    margin: 0;
    line-height: 1.6;
}

/* 通知动画样式 */

/* 闪烁动画 */
@keyframes blink {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

.blink {
    animation: blink 1.5s infinite;
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.bounce-animation {
    animation: bounce 1s ease-in-out;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 59, 48, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 通知徽章样式 */
.notification-badge {
    background: var(--danger-color) !important;
    color: white !important;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--danger-color);
}

/* Toast通知闪烁效果 */
@keyframes notification-flash {
    0%, 50%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    25% { 
        opacity: 0.8; 
        transform: scale(1.02);
    }
    75% { 
        opacity: 0.9; 
        transform: scale(0.98);
    }
}

.notification-flash {
    animation: notification-flash 2s ease-in-out;
}

/* 高亮更新效果 */
@keyframes highlight-update {
    0% { 
        background-color: rgba(0, 122, 255, 0);
        transform: scale(1);
    }
    50% { 
        background-color: rgba(0, 122, 255, 0.1);
        transform: scale(1.02);
    }
    100% { 
        background-color: rgba(0, 122, 255, 0);
        transform: scale(1);
    }
}

.highlight-update {
    animation: highlight-update 2s ease-in-out;
}

/* 房间警报样式 */
.room-alert {
    border: 2px solid var(--danger-color) !important;
    background: rgba(255, 59, 48, 0.05) !important;
    position: relative;
}

.room-alert::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--danger-color), var(--warning-color));
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0.3;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 紧急通知栏样式 */
#urgent-notification-bar {
    border: none !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

#urgent-notification-bar .blink {
    filter: drop-shadow(0 0 5px currentColor);
}

/* Toast容器优化 */
.toast-container {
    z-index: 11000 !important;
}

.toast {
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius) !important;
    min-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.toast .btn-sm {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
}

/* 声音波纹效果 */
@keyframes sound-wave {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.sound-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: 12000;
}

.sound-indicator::before,
.sound-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: sound-wave 1.5s infinite;
}

.sound-indicator::after {
    animation-delay: 0.5s;
}

/* 页面级通知增强 */
.page-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10500;
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast {
        min-width: 300px;
        margin: 0 10px;
    }
    
    #urgent-notification-bar {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    #urgent-notification-bar .btn-sm {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .toast {
        background: rgba(28, 28, 30, 0.95) !important;
        color: white;
    }
    
    .toast .btn-light {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    .toast .btn-light:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* 加载状态样式 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通知计数器增强 */
#pending-badge {
    min-width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#pending-badge.notification-badge {
    color: white !important;
    font-weight: 600;
}

/* 通知弹窗样式 */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.notification-popup {
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
}

.notification-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.notification-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    animation: notification-progress 8s linear;
}

@keyframes notification-progress {
    from { width: 100%; }
    to { width: 0%; }
}

.notification-icon {
    flex-shrink: 0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.notification-body {
    flex: 1;
    color: white;
}

.notification-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.notification-message {
    font-size: 14px;
    opacity: 0.95;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    opacity: 0.8;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

/* 响应式通知弹窗 */
@media (max-width: 768px) {
    #notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .notification-popup {
        transform: translateY(-100px);
    }
    
    .notification-popup.show {
        transform: translateY(0);
    }
} 
/* Edge浏览器兼容性修复 */
@supports (-ms-ime-align: auto) {
    body {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Edge Legacy兼容性 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .card {
        border: 1px solid #E5E5EA;
    }
    
    .btn {
        border: 1px solid transparent;
    }
}

/* 确保中文字符正确显示 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Edge浏览器的Flexbox修复 */
.d-flex {
    display: -ms-flexbox !important;
    display: flex !important;
}

.justify-content-center {
    -ms-flex-pack: center !important;
    justify-content: center !important;
}

.align-items-center {
    -ms-flex-align: center !important;
    align-items: center !important;
}

/* 相关案例样式 */
.related-cases {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.cases-header h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.case-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.case-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.case-number {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.satisfaction-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.satisfaction-excellent {
    background-color: #d4edda;
    color: #155724;
}

.satisfaction-good {
    background-color: #cce5ff;
    color: #004085;
}

.satisfaction-neutral {
    background-color: #fff3cd;
    color: #856404;
}

.satisfaction-poor {
    background-color: #f8d7da;
    color: #721c24;
}

.satisfaction-very-poor {
    background-color: #f5c6cb;
    color: #721c24;
}

.case-content {
    font-size: 0.9rem;
}

.case-problem, .case-solution {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.case-stats {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

/* 文档统计样式 */
.document-stats .stat-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.document-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.ai-tip {
    border-left: 4px solid #ffc107;
}
