@tailwind base;
@tailwind components;
@tailwind utilities;

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Han+Sans+SC:wght@300;400;500;600;700&display=swap');




:root {
  font-family: 'Inter', 'Source Han Sans SC', 'HarmonyOS Sans SC', system-ui, sans-serif;
}

/* 禁止复制、粘贴、右键、拖拽图片 */
html,
body,
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* 基础组件样式 */
@layer components {

  /* 主按钮 */
  .btn-primary {
    @apply relative overflow-hidden;
    height: 44px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 24px;
    background: linear-gradient(135deg, #B11226 0%, #8C0D1C 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(177, 18, 38, 0.2);
  }

  .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
  }

  .btn-primary:hover::before {
    left: 100%;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(177, 18, 38, 0.3);
  }

  .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(177, 18, 38, 0.2);
  }

  .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  /* 次按钮 */
  .btn-secondary {
    @apply relative overflow-hidden;
    height: 44px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 24px;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  /* 表单输入框 */
  .input-field {
    @apply h-[44px] text-body font-normal px-4;
    border-radius: 0;
    border: none !important;
    border-bottom: 1px solid #6b7280 !important;
    transition: all 0.2s;
  }

  .input-field:focus {
    outline: none !important;
    border: none !important;
    border-bottom: 1px solid #B11226 !important;
    box-shadow: none;
  }

  /* 标签 */
  .form-label {
    @apply text-caption font-medium text-gray-700;
  }
}


.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background-color: #B11226;
  color: white;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #9a0f20;
}

.input-field {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  width: 100%;
  font-size: 1rem;
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.card-shell {
  padding: 0 40px;
}

.card-padding {
  padding: 40px 0;
}

:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
}


/* Industrial card style helpers */
.card-shell {
  @apply bg-white rounded-[24px] border border-gray-200 shadow-[0_18px_40px_rgba(0, 0, 0, 0.12)];
}

.card-padding {
  @apply p-8 sm:p-10 lg:p-12;
}

/* Page container with wider content and modest side gutters */
.page-wrap {
  @apply max-w-[1720px] mx-auto px-4 sm:px-8 lg:px-10;
}

/* 表单输入框样式 - 确保下边框清晰可见 */
@layer components {
  .input-field {
    height: 44px;
    font-size: 15px;
    font-weight: 400;
    border-radius: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    border: none !important;
    border-bottom: 1px solid #6b7280 !important;
    transition: all 0.2s;
  }

  .input-field:focus {
    outline: none !important;
    border: none !important;
    border-bottom: 1px solid #B11226 !important;
    box-shadow: none;
  }

  /* 按钮样式系统 */
  .btn-primary {
    @apply relative overflow-hidden;
    height: 44px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 24px;
    background: linear-gradient(135deg, #B11226 0%, #8C0D1C 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(177, 18, 38, 0.2);
  }

  .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
  }

  .btn-primary:hover::before {
    left: 100%;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(177, 18, 38, 0.3);
  }

  .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(177, 18, 38, 0.2);
  }

  .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  .btn-secondary {
    @apply relative overflow-hidden;
    height: 44px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 24px;
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  .btn-success {
    @apply relative overflow-hidden;
    height: 44px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 24px;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
  }

  .btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
  }

  .btn-success:hover::before {
    left: 100%;
  }

  .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
  }

  .btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.2);
  }

  .btn-danger {
    @apply relative overflow-hidden;
    height: 36px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 0 16px;
    background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.2);
  }

  .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
  }

  .btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(211, 47, 47, 0.2);
  }

  .btn-info {
    @apply relative overflow-hidden;
    height: 36px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 0 16px;
    background: white;
    color: #2563eb;
    border: 2px solid #dbeafe;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-info:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  }

  .btn-info:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.1);
  }

  .btn-image {
    @apply relative overflow-hidden;
    height: 36px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 0 16px;
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-image:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .btn-image:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }

  .btn-quote {
    @apply relative overflow-hidden;
    height: 36px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 0 16px;
    background: white;
    color: #2563eb;
    border: 2px solid #dbeafe;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-quote:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  }

  .btn-quote:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.1);
  }

  .btn-specs {
    @apply relative overflow-hidden;
    height: 36px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 0 16px;
    background: white;
    color: #059669;
    border: 2px solid #d1fae5;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-specs:hover {
    background: #ecfdf5;
    border-color: #6ee7b7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
  }

  .btn-specs:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.1);
  }

  .btn-ghost {
    @apply relative overflow-hidden;
    height: 32px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 0 12px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-ghost:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
  }

  .btn-ghost:active {
    transform: translateY(0);
    background: #d1d5db;
  }

  .badge-success {
    display: inline-flex;
    align-items: center;
    height: 24px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    padding: 0 10px;
    background: #d1fae5;
    color: #059669;
  }

  .badge-gray {
    display: inline-flex;
    align-items: center;
    height: 24px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    padding: 0 10px;
    background: #f3f4f6;
    color: #6b7280;
  }

  /* 文件选择按钮样式 */
  .file-input-wrapper {
    @apply relative;
    display: inline-block;
    width: 100%;
  }

  .file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
  }

  .file-input-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    padding: 0 20px;
    background: #f8fafc;
    color: #475569;
    border: 2px dashed #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .file-input-wrapper:hover .file-input-button {
    background: #f1f5f9;
    border-color: #94a3b8;
  }

  .file-input-button-icon {
    font-size: 18px;
  }

  /* 下拉框样式 */
  .select-field {
    position: relative;
    width: 100%;
  }

  .select-field::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #64748b;
    pointer-events: none;
    transition: transform 0.3s, border-top-color 0.3s;
    z-index: 1;
  }

  .select-field:hover::after {
    border-top-color: #B11226;
  }

  .select-field:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #B11226;
  }

  .select-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 400;
    border-radius: 8px;
    padding: 0 44px 0 16px;
    background: white;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .select-field select:hover {
    border-color: #B11226;
    box-shadow: 0 2px 8px rgba(177, 18, 38, 0.1);
  }

  .select-field select:focus {
    outline: none;
    border-color: #B11226;
    box-shadow: 0 0 0 3px rgba(177, 18, 38, 0.1);
  }

  .select-field select option {
    padding: 12px;
    background: white;
    color: #1e293b;
  }

  .select-field select option:hover {
    background: #f1f5f9;
  }

  .select-field select option:checked {
    background: #B11226;
    color: white;
  }
}