/* Tailwind CSS 本地版本 */
:root {
  --primary: #165DFF;
  --secondary: #4080FF;
  --success: #00B42A;
  --warning: #FF7D00;
  --danger: #F53F3F;
  --dark: #1D2129;
  --dark-2: #4E5969;
  --light-1: #F2F3F5;
  --light-2: #E5E6EB;
  --light-3: #C9CDD4;
  --font-sans: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--dark);
  background-color: var(--light-1);
}

/* 容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* 网格系统 */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
  gap: 1rem;
}

/* 响应式 */
@media (min-width: 768px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .md\:col-span-1 {
    grid-column: span 1 / span 1;
  }
  
  .md\:flex-row {
    flex-direction: row;
  }
  
  .md\:mb-0 {
    margin-bottom: 0;
  }
}

/* 弹性布局 */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.space-x-4 > * + * {
  margin-left: 1rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

/* 边距 */
.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-8 {
  margin-top: 2rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-10 {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

/* 宽度 */
.w-full {
  width: 100%;
}

.w-8 {
  width: 2rem;
}

.h-8 {
  height: 2rem;
}

.h-16 {
  height: 4rem;
}

/* 文本 */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-dark {
  color: var(--dark);
}

.text-dark-2 {
  color: var(--dark-2);
}

.text-light-3 {
  color: var(--light-3);
}

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-danger {
  color: var(--danger);
}

.text-white {
  color: #ffffff;
}

/* 背景 */
.bg-white {
  background-color: #ffffff;
}

.bg-light-1 {
  background-color: var(--light-1);
}

.bg-light-2 {
  background-color: var(--light-2);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-primary\/10 {
  background-color: rgba(22, 93, 255, 0.1);
}

.bg-success\/10 {
  background-color: rgba(0, 180, 42, 0.1);
}

.bg-warning\/10 {
  background-color: rgba(255, 125, 0, 0.1);
}

.bg-danger\/90 {
  background-color: rgba(245, 63, 63, 0.9);
}

/* 边框 */
.border {
  border-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-light-2 {
  border-color: var(--light-2);
}

/* 圆角 */
.rounded-md {
  border-radius: 0.375rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 0.5rem;
}

/* 阴影 */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-card {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

/* 定位 */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.left-3 {
  left: 0.75rem;
}

/* 变换 */
.-translate-y-1 {
  transform: translateY(-0.25rem);
}

.-translate-y-1\/2 {
  transform: translateY(-50%);
}

/* 过渡 */
.transition-all-300 {
  transition: all 0.3s ease;
}

/* 交互 */
.hover\:bg-secondary:hover {
  background-color: var(--secondary);
}

.hover\:bg-danger\/80:hover {
  background-color: rgba(245, 63, 63, 0.8);
}

.hover\:bg-light-1:hover {
  background-color: var(--light-1);
}

.hover\:shadow-card-hover:hover {
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
}

.hover\:text-primary:hover {
  color: var(--primary);
}

.hover\:text-danger\/80:hover {
  color: rgba(245, 63, 63, 0.8);
}

/* 聚焦 */
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-2:focus {
  ring-width: 2px;
}

.focus\:ring-offset-2:focus {
  ring-offset-width: 2px;
}

.focus\:ring-primary:focus {
  ring-color: var(--primary);
}

.focus\:ring-danger:focus {
  ring-color: var(--danger);
}

.focus\:border-primary:focus {
  border-color: var(--primary);
}

/* 工具类 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.12);
  transform: translateY(-0.25rem);
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
}

.btn:focus {
  ring-width: 2px;
  ring-offset-width: 2px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

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

.btn-primary:focus {
  ring-color: var(--primary);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: rgba(245, 63, 63, 0.9);
}

.btn-danger:focus {
  ring-color: var(--danger);
}

.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-2);
  border-radius: 0.375rem;
  outline: none;
  transition: all 0.3s ease;
}

.input:focus {
  ring-width: 2px;
  ring-color: var(--primary);
  ring-offset-width: 2px;
  border-color: var(--primary);
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-2);
  margin-bottom: 0.25rem;
}

/* 布局 */
.min-h-screen {
  min-height: 100vh;
}

.overflow-x-auto {
  overflow-x: auto;
}

.z-10 {
  z-index: 10;
}

/* 隐藏/显示 */
.hidden {
  display: none;
}

/* 表格 */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
}

th {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-2);
  border-bottom: 1px solid var(--light-2);
}

tr {
  border-bottom: 1px solid var(--light-2);
}

tr:hover {
  background-color: var(--light-1);
  transition: all 0.3s ease;
}