/**
 * 智慧林业管理平台 - UI修复专用样式
 * 解决界面显示和交互问题
 */

/* 1. 增强通知系统样式 */
.enhanced-notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.enhanced-notification {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 0.8rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    min-height: 120px;
}

.enhanced-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.enhanced-notification.minimized {
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enhanced-notification.minimized:hover {
    transform: translateX(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.enhanced-notification.success {
    border-left: 4px solid var(--success-green);
}

.enhanced-notification.error,
.enhanced-notification.danger {
    border-left: 4px solid var(--danger-red);
}

.enhanced-notification.warning {
    border-left: 4px solid var(--warning-orange);
}

.enhanced-notification.info {
    border-left: 4px solid var(--info-blue);
}

.notification-content {
    padding: 1rem;
    color: var(--text-white);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.notification-icon i {
    font-size: 1.2rem;
}

.notification-info {
    flex: 1;
    margin-left: 0.8rem;
}

.notification-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.2rem;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.notification-message {
    font-size: 0.9rem;
    color: var(--text-white);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.notification-location {
    font-size: 0.8rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.notification-actions {
    margin-top: 0.8rem;
}

.notification-action {
    background: var(--accent-green);
    color: var(--text-white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.notification-action:hover {
    background: var(--light-green);
    transform: translateY(-1px);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-green);
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
}

.notification-minimized {
    display: none;
    align-items: center;
    padding: 0.8rem;
    height: 100%;
    gap: 0.8rem;
}

.minimized-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.minimized-info {
    flex: 1;
}

.minimized-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.2rem;
}

.minimized-time {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.notification-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-indicator.success { background: var(--success-green); }
.notification-indicator.error,
.notification-indicator.danger { background: var(--danger-red); }
.notification-indicator.warning { background: var(--warning-orange); }
.notification-indicator.info { background: var(--info-blue); }

/* 2. 状态项图标居中修复 */
.status-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
    transition: all 0.3s ease;
}

.status-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.status-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin-right: 1rem;
}

.status-icon i {
    font-size: 1.3rem;
    text-align: center;
}

.status-info {
    flex: 1;
}

.status-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.3rem;
}

.status-value {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.status-value.normal { color: var(--success-green); }
.status-value.warning { color: var(--warning-orange); }
.status-value.good { color: var(--success-green); }
.status-value.danger { color: var(--danger-red); }

.status-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 3. 任务项和按钮居中修复 */
.task-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--info-blue);
    transition: all 0.3s ease;
    min-height: 120px;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.task-item.priority-high {
    border-left-color: var(--danger-red);
}

.task-item.priority-medium {
    border-left-color: var(--warning-orange);
}

.task-item.priority-low {
    border-left-color: var(--info-blue);
}

.task-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    flex: 1;
}

.task-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.task-time, .task-assignee {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.task-status {
    margin-top: 0.5rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.in-progress {
    background: var(--warning-orange);
    color: var(--text-white);
}

.status-badge.pending {
    background: var(--text-secondary);
    color: var(--text-white);
}

.status-badge.completed {
    background: var(--success-green);
    color: var(--text-white);
}

.task-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.action-btn.primary {
    background: var(--accent-green);
    color: var(--text-white);
}

.action-btn.primary:hover {
    background: var(--light-green);
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 4. 报警统计颜色修复 */
.alert-summary {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.summary-count {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    line-height: 1;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* 待处理数字 - 橙色警告色 */
.summary-item:first-child .summary-count {
    color: var(--warning-orange);
    text-shadow: 0 0 10px rgba(255, 140, 66, 0.3);
}

/* 已处理数字 - 绿色成功色 */
.summary-item:last-child .summary-count {
    color: var(--success-green);
    text-shadow: 0 0 10px rgba(39, 174, 96, 0.3);
}

/* 5. 设备项图标居中 */
.equipment-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.equipment-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.equipment-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin-right: 0.8rem;
}

.equipment-icon i {
    font-size: 1.1rem;
    text-align: center;
}

.equipment-info {
    flex: 1;
}

.equipment-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 0.2rem;
}

.equipment-count {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.equipment-count .online {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success-green);
}

.equipment-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.deploy-btn, .view-btn, .monitor-btn, .check-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    background: var(--accent-green);
    color: var(--text-white);
}

.deploy-btn:hover, .view-btn:hover, .monitor-btn:hover, .check-btn:hover {
    background: var(--light-green);
    transform: translateY(-1px);
}

/* 6. 报警项样式优化 */
.alert-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--warning-orange);
    transition: all 0.3s ease;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.alert-item.level-warning {
    border-left-color: var(--warning-orange);
}

.alert-item.level-info {
    border-left-color: var(--info-blue);
}

.alert-item.level-danger {
    border-left-color: var(--danger-red);
}

.alert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin-right: 0.8rem;
}

.alert-icon i {
    font-size: 1rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.3rem;
}

.alert-location {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.2rem;
}

.alert-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alert-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: none;
    background: var(--accent-green);
    color: var(--text-white);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.alert-btn:hover {
    background: var(--light-green);
    transform: translateY(-1px);
}

/* 7. 护林员状态优化 */
.ranger-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ranger-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.ranger-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin-right: 0.8rem;
}

.ranger-icon i {
    font-size: 1.1rem;
    color: var(--accent-green);
}

.ranger-info {
    flex: 1;
}

.ranger-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.2rem;
}

.ranger-status-text {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.2rem;
}

.ranger-location {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ranger-signal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.signal-strength {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.signal-strength.strong {
    background: var(--success-green);
    color: var(--text-white);
}

.signal-strength.medium {
    background: var(--warning-orange);
    color: var(--text-white);
}

.signal-strength.weak {
    background: var(--danger-red);
    color: var(--text-white);
}

/* 8. 响应式优化 */
@media (max-width: 1200px) {
    .enhanced-notification {
        max-width: 350px;
    }
    
    .task-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .alert-summary {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .summary-item {
        flex-direction: row;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .enhanced-notification {
        max-width: 300px;
        margin-bottom: 0.5rem;
    }
    
    .status-item,
    .task-item,
    .equipment-item,
    .alert-item,
    .ranger-item {
        padding: 0.8rem;
    }
    
    .status-icon,
    .equipment-icon,
    .alert-icon,
    .ranger-icon {
        width: 35px;
        height: 35px;
    }
    
    .summary-count {
        font-size: 1.2rem;
    }
    
    .task-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        min-width: auto;
    }
}

/* 9. 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(82, 183, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(82, 183, 136, 0.6);
    }
}

/* 10. 特殊效果 */
.enhanced-notification.show {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-indicator {
    animation: pulse 2s infinite;
}

.summary-count {
    animation: glow 3s infinite;
}

.status-icon:hover,
.equipment-icon:hover,
.alert-icon:hover,
.ranger-icon:hover {
    animation: pulse 0.6s ease-in-out;
}