body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background-color: #fff;
    padding: 20px;
}

.container {
    width: 90%;
    max-width: 100%;
    margin: 0 auto;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group.row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.form-group.row > div {
    flex: 1;
}

select, input[type="text"], textarea {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box;
    outline: none;
}

select {
    width: 150px;
    padding-right: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" stroke="#666" stroke-width="2"><path d="M2 4l4 4 4-4"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
}

textarea {
    height: 200px;
    resize: none;
}

input::placeholder, textarea::placeholder {
    font-size: 12px;
    color: #666;
}

button {
    width: 100%;
    padding: 14px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #333;
}

.result-table {
    margin-top: 30px;
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.result-table tr[data-timeout="yes"]{
    background-color: #f9c2c2;
}

.result-table th, .result-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ef4444; /* 修改为红色底部边框 */
}

.result-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    color: #333;
}

.result-table tr:hover {
    background-color: #f9f9f9;
}

/* 点击过展开详情的行背景色 */
.result-table tr.details-expanded {
    background-color: #f0f8ff !important;
}

.status-pending {
    color: #f59e0b;
}

.status-delivered {
    color: #10b981;
}

.status-transit {
    color: #3b82f6;
}

.status-error {
    color: #ef4444;
}

/* 已投递特殊颜色 */
.delivered-status {
    color: #059669;
    font-weight: bold;
    background-color: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}

.result-table th:nth-child(1) {
    width: 36px;
    text-align: center;
}

.result-table th:nth-child(2) {
    width: 120px;
    text-align: center;
}

.result-table th:nth-child(3) {
    width: 90px;
    text-align: center;
}

.result-table th:nth-child(4) {
    width: 90px;
    text-align: center;
}

.result-table th:nth-child(5) {
    width: 90px;
    text-align: center;
}

.result-table th:nth-child(7) {
    width: 145px;
    text-align: center;
}

.result-table td:nth-child(1),
.result-table td:nth-child(2),
.result-table td:nth-child(3),
.result-table td:nth-child(4),
.result-table td:nth-child(5),
.result-table td:nth-child(7) {
    text-align: center;
}

.status-timeout {
    color: #ef4444;
    font-weight: bold;
}

.status-lost {
    color: #9333ea;
    font-weight: bold;
}

.filter-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-item select {
    width: auto;
    min-width: 100px;
}

/* 物流信息样式 */
.tracking-info {
    text-align: left;
    position: relative;
}

.latest-info-text {
    display: block;
    margin-bottom: 5px;
}

/* 展开/收起详情按钮移到右下角 */
.toggle-details {
    color: #3b82f6;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0;
    padding: 2px 4px;
    transition: color 0.2s; /* 添加颜色过渡效果 */
}

.toggle-details:hover {
    text-decoration: underline;
}

/* 新增：点击过的展开收起按钮变红色 */
.toggle-details.clicked {
    color: #ef4444 !important;
}

.tracking-list {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
}

.tracking-list li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tracking-list li:last-child {
    border-bottom: none;
}

.tracking-time {
    font-weight: bold;
    color: #666;
}

/* 物流信息样式 */
.tracking-info {
    text-align: left;
    position: relative;
}

.latest-info-text {
    display: block;
    margin-bottom: 5px;
}

/* 展开/收起详情按钮移到右下角 */
.toggle-details {
    color: #3b82f6;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0;
    padding: 2px 4px;
}

.toggle-details:hover {
    text-decoration: underline;
}

/* 移除原有的展开状态背景色样式，改为动态控制 */
.result-table tr.details-expanded {
    /* 移除固定背景色，改为JavaScript动态控制 */
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 不同日期标识样式 */
.date-different {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #f59e0b;
}