:root {
  --qe-primary: #005bff;
  --qe-primary-dark: #00368f;
  --qe-primary-bg: #e6efff;
  --qe-primary-border: #b8d0ff;
  --qe-ok: #16a34a;
  --qe-ok-bg: #dcfce7;
  --qe-warn: #d97706;
  --qe-warn-bg: #fef3c7;
  --qe-warn-border: #fde68a;
  --qe-danger: #dc2626;
  --qe-danger-bg: #fee2e2;
  --qe-danger-border: #fecaca;
  --qe-text: #0a0c14;
  --qe-text-2: #3a3e47;
  --qe-muted: #6b7280;
  --qe-border: #e9ebef;
  --qe-surface: #ffffff;
  --qe-surface-soft: #fafbfc;
  --qe-shadow: 0 16px 48px rgba(10, 12, 20, 0.18), 0 0 0 1px rgba(10, 12, 20, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
}
iframe {
	max-height:500px;
}
body {
    background-color: #f6f8fa;
    color: var(--qe-text);
    padding: 10px;
}

.container {
    margin: 0 auto;
    background: var(--qe-surface);
    border-radius: 12px;
    box-shadow: var(--qe-shadow);
    border: 1px solid var(--qe-border);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e7bff, var(--qe-primary));
    color: white;
    padding: 5px 5px;
    display: flex;
    align-items: center;
	justify-content: space-between;
	position:fixed;
	top:0px;
	left:10px;
	right:10px;
	border-radius: 12px 12px 0 0;
	z-index:1;
	box-shadow: 0 4px 12px rgba(0, 91, 255, 0.25);
}
.headerPlaceholder {
	height:40px;
	width:100%;
}
.logoBox{
	display: flex;
	align-items: center;
}

.logo {
    width: 30px; /* 减小Logo尺寸 */
    height: 30px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.logo img {
    width: 30px; /* 减小Logo内图片尺寸 */
    height: 30px;
}

.header h1 {
    font-size: 16px; /* 减小标题字体大小 */
    font-weight: 600;
}

.content {
    padding: 20px; /* 减小内容区域内边距 */
}

.section {
    margin-bottom: 10px; /* 进一步减小区块间距 */
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--qe-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.section-title span {
	margin-right:5px;
}
.section-titles  span {
	margin-right:5px;
}
.form-group {
    margin-bottom: 10px; /* 进一步减小表单项间距 */
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--qe-text-2);
    font-size: 13px;
}

.required::after {
    content: " *";
    color: #e53935;
}

input,
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--qe-border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--qe-surface-soft);
    color: var(--qe-text);
}
input:focus,
select:focus {
    outline: none;
    border-color: var(--qe-primary);
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.12);
}

.readonly {
    background-color: var(--qe-surface-soft);
    color: var(--qe-muted);
}

.row {
    display: flex;
    gap: 12px; /* 减小列之间的间距 */
    margin-bottom: 10px; /* 进一步减小行间距 */
}

.col {
    flex: 1;
}

.profit-display {
    background-color: var(--qe-surface-soft);
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    border: 1px solid var(--qe-border);
}

.profit-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    align-items: center;
    font-size: 13px;
}

.profit-value {
    font-weight: 600;
    color: var(--qe-primary);
    font-size: 13px;
}

.positive {
    color: var(--qe-ok);
}

.negative {
    color: var(--qe-danger);
}

.logistics-tier {
    background-color: var(--qe-primary-bg);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid var(--qe-primary-border);
}

.logistics-method-details {
    background-color: var(--qe-primary-bg);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    display: none;
    border: 1px solid var(--qe-primary-border);
}

.logistics-method-details.active {
    display: block;
}

.method-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--qe-primary-border);
    font-size: 13px;
}

.method-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tier-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--qe-primary-border);
    font-size: 13px;
}

.tier-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary {
    background: linear-gradient(135deg, #1e7bff, var(--qe-primary));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 91, 255, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976d2, var(--qe-primary-dark));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 91, 255, 0.35);
}

.btn-secondary {
    background-color: var(--qe-surface-soft);
    color: var(--qe-text-2);
    border: 1px solid var(--qe-border);
}

.btn-secondary:hover {
    background-color: var(--qe-border);
    transform: translateY(-1px);
}

.footer {
    text-align: center;
    padding: 12px;
    color: var(--qe-muted);
    font-size: 12px;
    background-color: var(--qe-surface-soft);
    border-top: 1px solid var(--qe-border);
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 91, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--qe-primary);
    animation: spin 1s linear infinite;
    margin-right: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.profit-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--qe-primary);
  animation: spin 1s ease-in-out infinite;
  margin-left: 6px;
  vertical-align: middle;
}

.profit-value.calculating {
  color: var(--qe-muted);
  font-style: italic;
}

.hidden {
    display: none;
}

.sku-selection {
    display: flex;
    gap: 15px;
}

.sku-selection label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    font-size: 13px;
}

.sku-selection input[type="radio"] {
    width: auto;
    margin-right: 4px;
}

.url-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.url-input-group input {
    flex: 1;
}

.remove-url-btn {
    width: 26px;
    height: 26px;
    border: none;
    background-color: var(--qe-danger);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.remove-url-btn:hover {
    background-color: #b91c1c;
}
/* 添加货币符号样式 */
.input-with-symbol {
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--qe-muted);
}

.input-with-symbol input {
    padding-left: 30px;
}

.profit-item .currency-symbol {
    position: static;
    margin-right: 4px;
    display: inline-block;
}

.deleteUrlBtn {
	background: var(--qe-danger);
	color: white;
	border: none;
	border-radius: 4px;
	padding: 4px 8px;
	cursor: pointer;
	font-size: 12px;
}
.deleteUrlBtn:hover {
	background: #b91c1c;
}


/* 加载遮罩层 */
#loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(10, 12, 20, 0.45);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	transition: opacity 0.3s;
}

/* 隐藏状态 */
#loading-overlay.hidden {
	opacity: 0;
	pointer-events: none;
}

/* 加载动画 */
.spinner {
	width: 50px;
	height: 50px;
	border: 5px solid var(--qe-border);
	border-top: 5px solid var(--qe-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}