/* Vue3风格UI框架 */

:root {
  /* Vue3主题色 */
  --vue-primary: #42b883;
  --vue-primary-dark: #33a06f;
  --vue-primary-light: #5dcc9e;
  --vue-secondary: #35495e;
  --vue-warning: #f0ad4e;
  --vue-danger: #ff6b6b;
  --vue-success: #51cf66;
  --vue-info: #339af0;
  
  /* 中性色 */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* 圆角 */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* 过渡动画 */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* 卡片组件 */
.vue3-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.vue3-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.vue3-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, var(--vue-primary) 0%, var(--vue-primary-dark) 100%);
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
}

.vue3-card-body {
  padding: 1.5rem;
}

.vue3-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background-color: var(--gray-50);
}

/* 按钮组件 */
.vue3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  min-height: 2.5rem;
}

.vue3-btn:focus-visible {
  outline: 2px solid var(--vue-primary);
  outline-offset: 2px;
}

.vue3-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 主要按钮 */
.vue3-btn-primary {
  background-color: var(--vue-primary);
  color: white;
}

.vue3-btn-primary:hover:not(:disabled) {
  background-color: var(--vue-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 次要按钮 */
.vue3-btn-secondary {
  background-color: var(--vue-secondary);
  color: white;
}

.vue3-btn-secondary:hover:not(:disabled) {
  background-color: #2a3a4d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 危险按钮 */
.vue3-btn-danger {
  background-color: var(--vue-danger);
  color: white;
}

.vue3-btn-danger:hover:not(:disabled) {
  background-color: #ff5252;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 成功按钮 */
.vue3-btn-success {
  background-color: var(--vue-success);
  color: white;
}

.vue3-btn-success:hover:not(:disabled) {
  background-color: #40c057;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 信息按钮 */
.vue3-btn-info {
  background-color: var(--vue-info);
  color: white;
}

.vue3-btn-info:hover:not(:disabled) {
  background-color: #228be6;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 轮廓按钮 */
.vue3-btn-outline {
  background-color: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.vue3-btn-outline:hover:not(:disabled) {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
}

.vue3-btn-outline-primary {
  border-color: var(--vue-primary);
  color: var(--vue-primary);
}

.vue3-btn-outline-primary:hover:not(:disabled) {
  background-color: var(--vue-primary);
  color: white;
}

/* 表单控件 */
.vue3-form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: var(--transition);
  background-color: white;
}

.vue3-form-control:focus {
  outline: none;
  border-color: var(--vue-primary);
  box-shadow: 0 0 0 3px rgb(66 184 131 / 0.1);
}

.vue3-form-control::placeholder {
  color: var(--gray-400);
}

.vue3-form-group {
  margin-bottom: 1rem;
}

.vue3-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.875rem;
}

/* 输入组 */
.vue3-input-group {
  display: flex;
  border-radius: var(--radius);
  transition: var(--transition);
  border: 1px solid var(--gray-300);
}

.vue3-input-group:focus-within {
  border-color: var(--vue-primary);
  box-shadow: 0 0 0 3px rgb(66 184 131 / 0.1);
}

.vue3-input-group .vue3-form-control {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.vue3-input-group .vue3-form-control:focus {
  box-shadow: none;
}

.vue3-input-group-prepend,
.vue3-input-group-append {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background-color: var(--gray-100);
  border: none;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.vue3-input-group-prepend {
  border-right: 1px solid var(--gray-300);
  border-radius: var(--radius) 0 0 var(--radius);
}

.vue3-input-group-append {
  border-left: 1px solid var(--gray-300);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 选择框 */
.vue3-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background-color: white;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  appearance: none;
  transition: var(--transition);
}

.vue3-select:focus {
  outline: none;
  border-color: var(--vue-primary);
  box-shadow: 0 0 0 3px rgb(66 184 131 / 0.1);
}

/* 复选框和单选框 */
.vue3-checkbox,
.vue3-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.vue3-checkbox input,
.vue3-radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.vue3-checkmark {
  height: 1rem;
  width: 1rem;
  background-color: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  margin-right: 0.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vue3-checkbox:hover input ~ .vue3-checkmark {
  border-color: var(--vue-primary);
}

.vue3-checkbox input:checked ~ .vue3-checkmark {
  background-color: var(--vue-primary);
  border-color: var(--vue-primary);
}

.vue3-checkmark:after {
  content: "";
  display: none;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.vue3-checkbox input:checked ~ .vue3-checkmark:after {
  display: block;
}

/* 警告框 */
.vue3-alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.vue3-alert-primary {
  color: var(--vue-primary-dark);
  background-color: var(--vue-primary-light);
  border-color: var(--vue-primary);
}

.vue3-alert-success {
  color: #2a6e35;
  background-color: #d3f9d8;
  border-color: var(--vue-success);
}

.vue3-alert-warning {
  color: #925e0b;
  background-color: #fff3bf;
  border-color: var(--vue-warning);
}

.vue3-alert-danger {
  color: #c92a2a;
  background-color: #ffe3e3;
  border-color: var(--vue-danger);
}

.vue3-alert-info {
  color: #1864ab;
  background-color: #d0ebff;
  border-color: var(--vue-info);
}

/* 表格 */
.vue3-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.vue3-table th,
.vue3-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.vue3-table th {
  background-color: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vue3-table tbody tr:hover {
  background-color: var(--gray-50);
}

.vue3-table-striped tbody tr:nth-child(even) {
  background-color: var(--gray-50);
}

/* 分页 */
.vue3-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem;
}

.vue3-page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-600);
  font-size: 0.875rem;
  transition: var(--transition);
}

.vue3-page-item:hover:not(.vue3-page-item-disabled) {
  background-color: var(--gray-100);
  color: var(--gray-800);
}

.vue3-page-item-active {
  background-color: var(--vue-primary);
  color: white;
  font-weight: 500;
}

.vue3-page-item-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 徽章 */
.vue3-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.vue3-badge-primary {
  background-color: var(--vue-primary-light);
  color: var(--vue-primary-dark);
}

.vue3-badge-success {
  background-color: #d3f9d8;
  color: #2a6e35;
}

.vue3-badge-warning {
  background-color: #fff3bf;
  color: #925e0b;
}

.vue3-badge-danger {
  background-color: #ffe3e3;
  color: #c92a2a;
}

.vue3-badge-info {
  background-color: #d0ebff;
  color: #1864ab;
}

/* 工具类 */
.vue3-text-center { text-align: center; }
.vue3-text-left { text-align: left; }
.vue3-text-right { text-align: right; }

.vue3-mt-1 { margin-top: 0.25rem; }
.vue3-mt-2 { margin-top: 0.5rem; }
.vue3-mt-3 { margin-top: 0.75rem; }
.vue3-mt-4 { margin-top: 1rem; }
.vue3-mt-5 { margin-top: 1.25rem; }

.vue3-mb-1 { margin-bottom: 0.25rem; }
.vue3-mb-2 { margin-bottom: 0.5rem; }
.vue3-mb-3 { margin-bottom: 0.75rem; }
.vue3-mb-4 { margin-bottom: 1rem; }
.vue3-mb-5 { margin-bottom: 1.25rem; }

.vue3-p-1 { padding: 0.25rem; }
.vue3-p-2 { padding: 0.5rem; }
.vue3-p-3 { padding: 0.75rem; }
.vue3-p-4 { padding: 1rem; }
.vue3-p-5 { padding: 1.25rem; }

.vue3-pt-1 { padding-top: 0.25rem; }
.vue3-pt-2 { padding-top: 0.5rem; }
.vue3-pt-3 { padding-top: 0.75rem; }
.vue3-pt-4 { padding-top: 1rem; }
.vue3-pt-5 { padding-top: 1.25rem; }

.vue3-pb-1 { padding-bottom: 0.25rem; }
.vue3-pb-2 { padding-bottom: 0.5rem; }
.vue3-pb-3 { padding-bottom: 0.75rem; }
.vue3-pb-4 { padding-bottom: 1rem; }
.vue3-pb-5 { padding-bottom: 1.25rem; }

.vue3-pl-1 { padding-left: 0.25rem; }
.vue3-pl-2 { padding-left: 0.5rem; }
.vue3-pl-3 { padding-left: 0.75rem; }
.vue3-pl-4 { padding-left: 1rem; }
.vue3-pl-5 { padding-left: 1.25rem; }

.vue3-pr-1 { padding-right: 0.25rem; }
.vue3-pr-2 { padding-right: 0.5rem; }
.vue3-pr-3 { padding-right: 0.75rem; }
.vue3-pr-4 { padding-right: 1rem; }
.vue3-pr-5 { padding-right: 1.25rem; }

/* Flexbox工具类 */
.vue3-flex { display: flex; }
.vue3-flex-col { flex-direction: column; }
.vue3-flex-wrap { flex-wrap: wrap; }
.vue3-items-center { align-items: center; }
.vue3-items-start { align-items: flex-start; }
.vue3-items-end { align-items: flex-end; }
.vue3-justify-center { justify-content: center; }
.vue3-justify-between { justify-content: space-between; }
.vue3-justify-around { justify-content: space-around; }

.vue3-gap-1 { gap: 0.25rem; }
.vue3-gap-2 { gap: 0.5rem; }
.vue3-gap-3 { gap: 0.75rem; }
.vue3-gap-4 { gap: 1rem; }
.vue3-gap-5 { gap: 1.25rem; }

/* Grid工具类 */
.vue3-grid { display: grid; }
.vue3-grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.vue3-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vue3-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vue3-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.vue3-col-span-1 { grid-column: span 1 / span 1; }
.vue3-col-span-2 { grid-column: span 2 / span 2; }
.vue3-col-span-3 { grid-column: span 3 / span 3; }
.vue3-col-span-4 { grid-column: span 4 / span 4; }

/* 响应式断点 */
@media (min-width: 640px) {
  .vue3-sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vue3-sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vue3-sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .vue3-md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vue3-md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vue3-md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .vue3-lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vue3-lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vue3-lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 动画 */
.vue3-fade-enter-active,
.vue3-fade-leave-active {
  transition: opacity 0.2s ease;
}

.vue3-fade-enter-from,
.vue3-fade-leave-to {
  opacity: 0;
}

.vue3-slide-up-enter-active,
.vue3-slide-up-leave-active {
  transition: all 0.3s ease;
}

.vue3-slide-up-enter-from,
.vue3-slide-up-leave-to {
  opacity: 0;
  transform: translateY(20px);
}

/* 加载状态 */
.vue3-loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--vue-primary);
  animation: vue3-spin 1s ease-in-out infinite;
}

@keyframes vue3-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 隐藏元素 */
[v-cloak] {
  display: none;
}