<template>
  <div class="quick-actions">
    <div class="card-header">
      <h3 class="card-title">快捷操作</h3>
    </div>
    <div class="action-list">
      <div class="action-item" @click="$emit('logout')">
        <el-icon><SwitchButton /></el-icon>
        <span>退出登录</span>
      </div>
    </div>
  </div>
</template>

<script setup>
import { SwitchButton } from "@element-plus/icons-vue";

defineEmits(["logout"]);
</script>

<style scoped lang="less">
.quick-actions {
  background: var(--el-bg-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--el-border-color-lighter);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s;

  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--el-border-color-lighter);

  .card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--el-text-color-primary);
  }
}

.action-list {
  .action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;

    .el-icon {
      font-size: 20px;
      color: var(--el-color-primary);
    }

    span {
      font-size: 14px;
      color: var(--el-text-color-primary);
    }

    &:hover {
      background: var(--el-fill-color-light);
    }
  }
}

@media (max-width: 768px) {
  .quick-actions {
    padding: 16px;
  }
}
</style>
