/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

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

/* 头部样式 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 30px;
}

.logo {
  display: flex;
  justify-content: flex-start;
}

.logo img {
  height: 60px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 主内容样式 */
.main-content {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 30px;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #333;
}

.help-text {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

/* 表格样式 */
.markup-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.markup-table {
  width: 100%;
  border-collapse: collapse;
}

.markup-table th,
.markup-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.markup-table th {
  background-color: #f0f4f8;
  font-weight: bold;
  color: #445;
  border-bottom: 2px solid #dde;
  padding: 12px 15px;
  text-align: center;
  letter-spacing: 0.5px;
}

.markup-table tr:hover {
  background-color: #f5f5f5;
}

.markup-table .loading {
  text-align: center;
  color: #999;
}

.markup-table input[type="number"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn i {
  margin-right: 5px;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0069d9;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.actions-container {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* 提示消息样式 */
.alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0;
  border-radius: 0;
  z-index: 1000;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  display: none;
  animation: slideDown 0.5s ease-in-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.alert-success {
  background-color: #28a745;
  color: white;
  border: none;
  display: block;
}

.alert-danger {
  background-color: #dc3545;
  color: white;
  border: none;
  display: block;
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: #777;
}

/* 响应式样式 */
@media screen and (max-width: 768px) {
  .logo img {
    height: 50px;
  }
  
  .markup-table th, 
  .markup-table td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 10px;
  }
  
  .main-content {
    padding: 15px;
  }
  
  .logo img {
    height: 40px;
  }
  
  .markup-table th, 
  .markup-table td {
    padding: 8px 5px;
    font-size: 0.8rem;
  }
  
  .markup-table input[type="number"] {
    padding: 5px;
    font-size: 0.8rem;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  .help-text {
    font-size: 0.8rem;
  }
  
  .actions-container {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* 添加加减按钮样式 */
.adjustment-buttons {
  display: flex;
  margin-top: 5px;
  justify-content: center;
}

.btn-mini {
  width: 25px;
  height: 25px;
  padding: 0;
  margin: 0 2px;
  border-radius: 3px;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-mini:hover {
  background-color: #e9ecef;
}

.btn-inc {
  color: #28a745;
}

.btn-dec {
  color: #dc3545;
}

/* 增加输入框样式 */
.markup-input {
  width: 80px;
  text-align: center;
  padding: 4px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.markup-input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 价格调整样式 */
.price-adjustment {
  margin-bottom: 15px;
  padding: 8px 10px;
  border-radius: 5px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
}

.price-adjustment:last-child {
  margin-bottom: 0;
}

.price-adjustment label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 5px;
}

/* 新的调整控件样式 */
.adjust-control {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.price-adjustment .markup-input {
  width: 70px;
  margin: 0 8px;
  text-align: center;
  padding: 6px 4px;
  height: 32px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

/* 修改加减按钮样式 */
.btn-mini {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.btn-mini:hover {
  background-color: #e9ecef;
}

.btn-inc {
  color: #28a745;
  border-color: #28a745;
}

.btn-inc:hover {
  background-color: #e8f5e9;
}

.btn-dec {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-dec:hover {
  background-color: #fbeaea;
}

/* 调整表格样式以适应新的布局 */
.markup-table td {
  vertical-align: middle;
  padding: 15px;
}

.markup-table td:nth-child(1) {
  width: 15%;
  font-weight: 500;
}

.markup-table td:nth-child(2) {
  width: 20%;
}

.markup-table td:nth-child(3) {
  width: 40%;
}

.markup-table td:nth-child(4) {
  width: 25%;
  font-weight: 500;
}

/* 价格显示样式 */
.final-buy-price, .final-sell-price {
  color: #007bff;
  font-weight: bold;
}

@media screen and (max-width: 768px) {
  .price-adjustment {
    padding: 6px 8px;
    margin-bottom: 10px;
  }
  
  .price-adjustment label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }
  
  .adjust-control {
    justify-content: center;
  }
  
  .price-adjustment .markup-input {
    width: 60px;
    font-size: 0.8rem;
    height: 28px;
    padding: 4px;
    margin: 0 5px;
  }
  
  .btn-mini {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .markup-table td {
    padding: 10px 8px;
  }
  
  .markup-table td:nth-child(1) {
    width: 20%;
  }
  
  .markup-table td:nth-child(3) {
    width: 35%;
  }
}

@media screen and (max-width: 480px) {
  .markup-table td {
    padding: 8px 5px;
  }
  
  .markup-table td:nth-child(1),
  .markup-table td:nth-child(2),
  .markup-table td:nth-child(3),
  .markup-table td:nth-child(4) {
    width: auto;
  }
  
  .price-adjustment {
    padding: 5px;
  }
  
  .price-adjustment .markup-input {
    width: 50px;
    margin: 0 3px;
    font-size: 0.7rem;
    height: 24px;
    padding: 2px;
  }
  
  .btn-mini {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
}

/* 价格控制面板样式 */
.price-control-flags {
  margin: 15px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #eaeaea;
}

.price-control-flags h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #343a40;
  font-size: 18px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 10px;
}

.price-control-flags h3 i {
  margin-right: 8px;
  color: #0056b3;
}

.flag-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.flag-control {
  padding: 12px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #e2e2e2;
  transition: all 0.3s ease;
}

.flag-control.disabled {
  opacity: 0.6;
  background-color: #f0f0f0;
  cursor: not-allowed;
}

.flag-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.flag-control-header label {
  font-weight: 500;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.flag-control-header label i {
  margin-right: 8px;
  color: #0056b3;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
}

.toggle-status {
  margin-left: 10px;
  font-size: 14px;
  color: #6c757d;
}

.help-text {
  font-size: 13px;
  color: #6c757d;
  display: block;
  margin-top: 5px;
}

.help-text i {
  margin-right: 5px;
  color: #17a2b8;
}

.control-note {
  margin-top: 10px;
  background-color: #fff3cd;
  padding: 10px;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
}

.control-note p {
  margin: 0;
  font-size: 14px;
  color: #856404;
}

.control-note i {
  margin-right: 8px;
}

/* 手动价格控制输入框 */
.manual-price-controls {
  margin-top: 12px;
  padding: 10px;
  background-color: #f1f8ff;
  border-radius: 4px;
  border: 1px dashed #b8daff;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  transition: all 0.3s ease;
}

.manual-price-controls.hidden {
  display: none;
}

.price-control {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 150px;
}

.price-control label {
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 14px;
  color: #495057;
}

.price-control input {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 15px;
  transition: border-color 0.15s ease-in-out;
}

.price-control input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.price-control input::placeholder {
  color: #adb5bd;
}

/* 移动设备适配 */
@media screen and (max-width: 768px) {
  .price-control-flags {
    padding: 12px;
  }
  
  .price-control-flags h3 {
    font-size: 15px;
  }
  
  .flag-control {
    padding: 10px;
    margin-bottom: 8px;
  }
  
  .flag-control-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .toggle-wrapper {
    margin-top: 8px;
  }
  
  .flag-control .help-text {
    margin-top: 8px;
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .price-control-flags {
    padding: 10px;
  }
  
  .price-control-flags h3 {
    font-size: 14px;
  }
  
  .flag-control {
    padding: 8px;
  }
  
  .toggle-status {
    font-size: 12px;
  }
}

/* 价格控制面板样式 - 优化版 */
.price-control-panel {
  margin: 15px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #eaeaea;
}

.price-control-panel h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #343a40;
  font-size: 18px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 10px;
}

.price-control-panel h3 i {
  margin-right: 8px;
  color: #0056b3;
}

.price-control-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 控制开关组件 */
.control-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #e2e2e2;
}

.control-toggle label {
  font-weight: 500;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.control-toggle label i {
  margin-right: 8px;
  color: #0056b3;
}

.help-tooltip {
  margin-left: 5px;
  color: #6c757d;
  cursor: help;
}

.help-tooltip i {
  color: #17a2b8 !important;
}

.toggle-switch {
  display: flex;
  align-items: center;
}

.toggle-status {
  margin-left: 10px;
  font-size: 14px;
  color: #6c757d;
}

/* 控制输入组件 */
.control-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px;
  background-color: #f1f8ff;
  border-radius: 4px;
  border: 1px dashed #b8daff;
  transition: all 0.3s ease;
}

.control-inputs.hidden {
  display: none;
}

.price-input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 150px;
}

.price-input-group label {
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 14px;
  color: #495057;
}

.price-input-group input {
  padding: 8px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 15px;
  transition: border-color 0.15s ease-in-out;
}

.price-input-group input:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.price-input-group input::placeholder {
  color: #adb5bd;
}

/* 提示说明样式 */
.control-note {
  padding: 10px;
  background-color: #fff3cd;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
}

.control-note p {
  margin: 0;
  font-size: 13px;
  color: #856404;
}

.control-note i {
  margin-right: 8px;
}

/* 黄金行高亮样式 */
.gold-row {
  background-color: #fffaf0 !important;
  border-left: 3px solid #ffd700;
}

.gold-row:hover {
  background-color: #fff6e6 !important;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
  .control-toggle {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .toggle-switch {
    margin-top: 10px;
  }
  
  .control-inputs {
    padding: 10px;
  }
}

@media screen and (max-width: 480px) {
  .control-toggle {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .toggle-switch {
    margin-top: 10px;
  }
  
  .control-inputs {
    padding: 10px;
  }
}

/* 大盘原价参考样式 */
.market-price-reference {
  margin: 10px 0;
  padding: 12px;
  background-color: #f0f4f8;
  border-radius: 4px;
  border: 1px solid #d5dee6;
}

.reference-title {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #34495e;
  margin-bottom: 8px;
}

.reference-title i {
  color: #2980b9;
  margin-right: 8px;
}

.reference-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.reference-price {
  color: #555;
  font-size: 14px;
}

.reference-price strong {
  color: #e74c3c;
  font-size: 16px;
  font-weight: 600;
  margin-left: 4px;
}

@media screen and (max-width: 480px) {
  .reference-prices {
    flex-direction: column;
    gap: 8px;
  }
} 