/* Tailwind配置 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .scan-border {
        position: relative;
    }
    .scan-border::before, .scan-border::after {
        content: '';
        position: absolute;
        width: 30%;
        height: 5px;
        background: #4F46E5;
        z-index: 20;
    }
    .scan-border::before {
        top: 0;
        left: 0;
        animation: scanTop 2s infinite;
    }
    .scan-border::after {
        bottom: 0;
        right: 0;
        animation: scanBottom 2s infinite;
    }
    @keyframes scanTop {
        0% { width: 0; }
        50% { width: 30%; }
        100% { width: 0; left: 70%; }
    }
    @keyframes scanBottom {
        0% { width: 0; }
        50% { width: 30%; }
        100% { width: 0; right: 70%; }
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #e2e8f0;
    width: 80%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #475569;
}

.alert {
    padding: 15px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.alert.show {
    opacity: 1;
    transform: translateY(0);
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #a7f3d0;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #334155;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.hidden {
    display: none;
}

/* 提示框样式 */
#modalAlert > div {
    animation: fadeIn 0.3s ease-out forwards;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
}

#modalAlert > div .fa {
    margin-right: 0.5rem;
}

/* 不同类型提示的样式 */
.bg-green-50 { background-color: #ecfdf5; }
.border-green-400 { border-color: #4ade80; }
.text-green-700 { color: #065f46; }

.bg-red-50 { background-color: #fef2f2; }
.border-red-400 { border-color: #f87171; }
.text-red-700 { color: #991b1b; }

.bg-blue-50 { background-color: #eff6ff; }
.border-blue-400 { border-color: #60a5fa; }
.text-blue-700 { color: #1d4ed8; }

/* 新增颜色类定义，确保按钮颜色正确 */
.bg-primary {
    background-color: #4F46E5;
}
.bg-secondary {
    background-color: #10B981;
}
.bg-danger {
    background-color: #EF4444;
}
.text-primary {
    color: #4F46E5;
}
.text-secondary {
    color: #10B981;
}
.text-danger {
    color: #EF4444;
}
.hover\:bg-primary\/90:hover {
    background-color: rgba(79, 70, 229, 0.9);
}
.hover\:bg-secondary\/90:hover {
    background-color: rgba(16, 185, 129, 0.9);
}
.hover\:bg-danger\/90:hover {
    background-color: rgba(239, 68, 68, 0.9);
}
/* 主页面箱号输入框样式 */
.big-box-input-group {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 3px solid #4F46E5;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1), 0 2px 4px -1px rgba(79, 70, 229, 0.06);
}

.big-box-input-group label {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: #4F46E5;
}

.big-box-input-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.big-box-input-group input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}